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

Scott Aron Bloom Scott.Bloom at sabgroup.com
Wed Sep 23 17:19:26 CEST 2009


-----Original Message-----
From: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] On Behalf Of Girish
Ramakrishnan
Sent: Wednesday, September 23, 2009 3:13 AM
To: qt-interest at trolltech.com
Subject: Re: [Qt-interest] Problesm with utf-8 encoded XML and
japanesecharacters

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
-------------
Im using the string in a QMenu as well as a QLabel..  Both are jibberish

Scott





More information about the Qt-interest-old mailing list