[Qt-interest] Displaying unicode strings
Steven Doerfler
sgd-qt at lugaru.com
Sun Aug 29 01:43:55 CEST 2010
On 8/28/2010 6:32 AM, Eeli Reilin wrote:
>> Qt is fully unicode capable, so you have another issue. Could you be
>> more explicit in how you "have" those strings? Where do they come
>> from? In what do you have them? In a QString?
> The strings come from Facebook via an API request, which returns a JSON
> encoded data, and then the JSON data is parsed into strings. An example
> string might be: "Myyd\u00c4\u00c4n", which should be "Myydään".
It sounds like you're decoding the JSON data by hand. Perhaps you
should consider using a library like QJson. I expect it would handle
interpreting the \u sequences for you, since they are part of the JSON
specification. I haven't used QJson myself though.
http://qjson.sourceforge.net/
Good luck!
Steven
More information about the Qt-interest-old
mailing list