Base64ing Unicode characters


Can Unicode characters be encoded and decoded with Base64?

I have attempted to encode the string 'الله', but when I decoded it all I got was '????'.

Best Answer

Base64 converts binary to text. If you want to convert text to a base64 format, you'll need to convert the text to binary using some appropriate encoding (e.g. UTF-8, UTF-16) first.