Skip to main content
panduvittala
Inspiring
June 18, 2014
Question

encoded double byte characters string conversion

  • June 18, 2014
  • 1 reply
  • 586 views

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.

This topic has been closed for replies.

1 reply

A. Patterson
Inspiring
June 18, 2014

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.

panduvittala
Inspiring
June 18, 2014

I got it from translation team. They said it is the standard format they encode multi-byte characters into.