[Qt-interest] Problesm with utf-8 encoded XML and japanese characters

Girish Ramakrishnan girish at forwardbias.in
Wed Sep 23 12:12:41 CEST 2009


Hi Scott,

Scott Aron Bloom wrote:
<..snipped..>
> The japansese characters have been replaced with the ascii
> representation of the text, not the unicode.
> 

What makes you think that the text is not correct? Is that because of
'qDebug() << tmp'? If so, then you need to know that qDebug converts
strings to local8Bit and hence what you see in your terminal won't be
correct. Try 'std::wcout << tmp.toStdWString()' or even better display
the string using a QLabel, mesage box or somewhere in the UI.

Girish



More information about the Qt-interest-old mailing list