[Php-qt-users] QLineEdit and utf-8 strings
Status: Beta
Brought to you by:
tm243
From: Ferenc V. <li...@ne...> - 2006-01-16 10:11:04
|
Hi all, I've two small questions. 1. QLineEdit->$text (with plain ascii text first) Works: $this->txtGuessPercents[$i]->setText($tr["percent"]."%"); Does not work: $this->txtGuessPercents[$i]->$text = $tr["percent"]."%"; Error message: "Cannot access empty property". According to the Qt docs there is a .text property, but I don't understand the ZEND code in qlineedit.cpp to see what it can do. :-) 2. QString character code conversions I think these routines are not ready yet, it would be great to have them as time allows. As you could saw on my tests, all localized strings were displayed broken. ::toUtf8 ::fromUtf8 and similar functions. I don't have any utf-16 strings, so all I can do with QString is dumping core files. :-) $txt = new QString("Hello"); $this->txtGuessTranslations[$i]->setText($txt); Something like that? (Dumps core at the moment, in the second line.) That would probably require QString's static ::fromUtf8 or ::fromAscii methods, becase "Hello" written in source code is not Unicode. Anyway, I am not sure my code handles the UTF-8 strings right, I did nothing more than adding the encoding to the originating XML's header and creating MySQL tables with UTF-8 setting. I did nothing in PHP direcly. (I don't have such strings in the source code of course.) When I fill those UTF-8 strings to the QLineEdit, they display as "UTF-8 binary". Thanks, Ferenc _______________________________________________ Php-qt-users mailing list Php...@li... http://lists.berlios.de/mailman/listinfo/php-qt-users |