Re: [Php-qt-users] QLineEdit and utf-8 strings - unicode support
Status: Beta
Brought to you by:
tm243
From: Thomas M. <tm...@ip...> - 2006-01-17 09:58:58
|
=46erenc Veres wrote on Dienstag, 17. Januar 2006 02:12: > Then what is the input encoding? If UTF-8 input just works? Ok, I try > with ISO-8859-1. > > $QString =3D new QString("hell=C3=B3"); > > written in Latin1 prints broken characters to the output. So is the > input encoding UTF-8 for "char*"? I just don't get it. Ok, so UTF-8 is > the default input encoding for "char*". Is that right? Trolls wrote: "Constructs a string initialized with the ASCII string str." And next "str is converted to Unicode using fromAscii()." > My test is proves of nothing. See: > > I input Latin1 chars and output to UTF-8 terminal. I got broken > characters. So this may still mean, that "string travels as binary > entity", or that "wrong input returns wrong output". While entering > UTF-8 text looked fine, that proves either "string travels as binary > entity" or "correct input printed correct output". > > The only proof is when these letters are correctly displayed on the GUI! > (As far as I see now.) Lets finish QString and test all functions there. All I have seen in php=20 internals stores strings binary. Maybe, we have luck. > Yes, I am glad to see that Qt has so advanced features for handling > encodings. Note, that "toAscii()" will probably lose some characters, > e.g. in Japanese it will lose most of them. :-) I hope that won't be a > requirement. We will see. There are toAscii() toLatin1 toUtf8 =2E.. One of these I can use for the magically __toString() method. =2D-=20 Thomas |