I found this on a forum post, and just wanted to verify that this information is correct:
for base64 the valid charset is:
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx yz0123456789+/
the = is used as filler for the last bytes, as the length must be mulitple
of 3(via thescripts.com/forum)
The charset looks reasonable, but must the length be a multiple of 3? (Seems like a multiple of 4 would make more sense.)
Comments very much appreciated!
I was searching about some features of the base64 encoding when I looked your page, I think that you already know about the “=” character on the encoding, well, I want to publish here, the “=” character “is used to signify a special processing functions”, you can look the definition in the RFC: http://www.faqs.org/rfcs/rfc4648.html
And yes, the length of the text must be 3, because 24 bits (3 bytes) are treated as 4 concatened 6-bit groups, so a padding is used in a text where its length is not multiple of 3.
b64(‘a’) = “YQ==”
b64(“ab”) = “YWI=”
b64(“abc”) = “YWJj”
b64(“abcd”) = “YWJjZA==”
Thank you. simple and straight forward
i was looking for a safe delimiter between two or more base64 encoded strings
i think i’ll go with | 🙂
When used in JSON comunications, JSON changes “+” to “”. I needed to change every “+” to “_” in order to be able to use Base64 in JSON