Data in Japanese and Chinese when converted from text to binary and then binary to base64 returns garbage value. Any idea why?
Hi Shivani Choubey,
The default encoding for text to binary data is utf8.
Encoding for Chinese for instance is GB 2312, I suggest you to try for each language the better encoding.
Regards
When converting text to binary, ensure that you're using the correct encoding (like UTF-8) and that each character is represented properly in binary.
Base64 Encoding: Base64 encoding operates on binary data. If the binary data is incorrect or incomplete, the resulting base64 encoding will be garbage.
Hi Shivani,
Note that Base64 isn't human-readible - anything converted to Base64 will look like "garbage" (though typically garbage that looks like Base64).
As for converting Text to Binary Data, you need to select the right encoding. Typically this would be utf-8 (which I think is the default for TextToBinaryData). But TextToBinaryData doesn't support many encodings, so if your Japanese or Chinese is encoded in something other than utf-8, you'll likely need some Extension to first convert it to utf-8, or to directly convert it to Binary Data if you do not want to use utf-8.
Hi Kilian,
We send the Base64 data to an API which generates a PDF based on the info we send. In this PDF we get the garbage value which looks like this
I should've explained better and included this in the first place, my bad.
For Converting Binary Data to Text , you need to select right encoding "unicode". and you need some extension to support this conversion Image for your reference.
Hope it will helps.