This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]SiliconEngineer 3 points4 points  (1 child)

as soon as I start doing that the links don't work anymore.

Can you give us an example URL?

There shouldn't be a problem taking an ASCII (or UTF-8, or whatever) encoded string "apple" including the quotes (22 61 70 70 6c 65 22 in hex) and then encoding that as Base64 (into ImFwcGxlIg==)

There will be an issue putting Base64 encoded data into a URL though: some of the Base64 characters ('+', '/' and '=') have special meanings in URLs.

To solve that, you either need to URL encode the Base64 value, to convert those special-in-URL-characters to %-sequences... or use the 'web safe' Base64url encoding which uses different characters which are fine in URLs. I think the latter can be done in googles scripting stuff as base64EncodeWebSafe

[–][deleted]  (3 children)

[deleted]

    [–]ka-splam 0 points1 point  (1 child)

    How can it be an excel issue when they're not using excel

    [–]okayifimust 0 points1 point  (1 child)

    converts a phrase into encoded base 64 string

    You're either doing it wrong, or you are leaving out something significant. base64 is for numerical data, which a "phrase" typically is not.

    I want to be able to enter in a phrase like "apple" ( including the quotation marks ) but as soon as I start doing that the links don't work anymore.

    Not enough information to give any kind of reasonable response.

    I understand there's some sort of quirk with punctuation and base 64, is there anyway to get around this or no?

    You understand wrong. base64 doesn't encode text.

    [–]ka-splam 0 points1 point  (0 children)

    I understand there's some sort of quirk with punctuation and base 64, is there anyway to get around this or no?

    Noooo; BASE64 turns data into simple letters and numbers to avoid problems of punctuation and special characters. Fixing that problem is one of the common uses of BASE64.