Octet (8-bit characters) -> Base64 (6-bit) conversion is converted to bytes rather than characters, so it works the same regardless of your string encoding.
To be clear: Base64 is not a character encoding. The sender and receiver need to agree on the character encoding (ASCII, UTF-8, UTF-16, UCS-2, etc.), as well as the transport method (Base64, gzip, etc.).
source
share