Is it possible for a string generated from a base64 encoding to have a space (' ') in it?
Yes. Base64-encoded string can contain white-spaces but the characters are not significant. So it's ok if database trims spaces. As a matter of fact, the original MIME specification recommends to break Base64 strings into lines of 72 characters.
The base 64 digits in ascending order from zero are the uppercase characters 'A' to 'Z', lowercase characters 'a' to 'z', numerals '0' to '9', and the symbols '+' and '/'. % is not allowed in base64 encoding.
The BASE64ENCODE function returns the Base64 encoded version of the binary values of a character string. The schema is SYSTOOLS. A character expression to be encoded. The maximum length in 2732 characters.
Base64 only contains A–Z , a–z , 0–9 , + , / and = . So the list of characters not to be used is: all possible characters minus the ones mentioned above. For special purposes .
No. Next question?
http://en.wikipedia.org/wiki/Base64#Variants_summary_table
Actually, spaces and CRLFs are usually silently skipped during the decoding, as they might appear as a result of splitting long strings.
By reading the http://en.wikipedia.org/wiki/Base64 wiki it seems that in Base64 transfer encoding for MIME (RFC 2045) spaces are allowed and discarded. In all other variants they are forbidden. Ah... and this question is a duplicate: Can a base64 encoded string contain whitespace?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With