Copy link to clipboard
Copied
I have double byte encoded strings stored in a properties file. A sample of such string below (I think it is japanese):
\u30fc\u30af\u306e\u30a2
I am supposed to read it from file, convert it to actual string and use them on UI. I am not able to figure how to do the conversion -- the string contains text as is, char backslash, char u, and so on. How to convert it to correct text (either using ai::UnicodeString or otherwise)?
Thanks.
Copy link to clipboard
Copied
Where did this file come from? Some kind of Java or Ruby export? I don't think AI has anything in its SDK that would natively read that. You could just parse the string, looking for \u[4 characters]. I believe if you created a QChar and initialized it with the integer value of the four-character hex string, it would properly create the character.
Copy link to clipboard
Copied
I got it from translation team. They said it is the standard format they encode multi-byte characters into.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now