[Kwintv] Re: Re: [PATCH] New DCOP methods

Andras Mantia amantia at kde.org
Wed Jun 2 22:42:46 CEST 2004


Dirk Ziegelmeier wrote:

> On Wednesday 02 June 2004 22:09, Andras Mantia wrote:
>> > Other whishes: -> TODO list.
>>
>> Well, my only wish is an old one, already present in the TODO file...
> The OSD is new ;-)
Yeah, I realized later. ;-)

>> Fixed now. You have to set the encoding for the QTextStream first. The
>> toString() to save() change might not be needed, but it doesn't hurt.
> Hm. Not really sure. Where is the difference between the previous
> doc.toString().utf8()? Looks like it is now saved in iso8859-1 for me.
> With my old SuSE the german umlaut "ü" was saved as "ü", now it's saved
> as "ü". But I'm not sure what the correct encoding is...
"ü" looks UTF-16 or something else for me. UTF8 is one byte and "ü" is
correct for it (we also have such characters in Hungarian ;-)).
toString().utf8() was useless anyway, as QString is in unicode and a
QTextStream accepts QStrings. The documentation of QTextStream says that
without encoding setting it uses local 8-bit and it doesn't matter what you
put to the stream.
 So the output might be influenced by the local setting, but I'm not so good
in the encoding details. Reading is automatically detected, so the best is
to make sure it's saved in UTF8 and this is done by setting the encoding
for the textstream. I had encoding problems in the past and using
setEncoding() always solved the problem. ;-)

Andras

> 
> Dirk



More information about the kwintv mailing list