Qt-interest Archive, February 2008
Compiling UTF strings
Message 1 in thread
Hi All,
Usually I'm writing my own Qt's projects in English then make
translation for them, but yesterday I forced to make a quick project
(deadline of my homework Approached), and wrote Unicode strings directly
in the source files, then I shocked =-O
All Unicode strings appeared in strange text format like Martian
language huh :-P , as shown in the following images, although my source
file have UTF-8 encoding.
What's wrong?!
http://img218.imageshack.us/img218/9651/01jt9.png
http://img89.imageshack.us/img89/4062/02ru6.png
http://img138.imageshack.us/img138/5845/03tz1.png
--
[ signature omitted ]
Message 2 in thread
As a hint, try to specify your encoding like this:
QMessageBox::information(this, QString::fromUtf8("fancy-utf8-string"), QString::fromUtf8("more-utf8"));
Cheers,
Peter
> -----Ursprüngliche Nachricht-----
> Von: M. Bashir Al-Noimi [mailto:mhdbnoimi@xxxxxxxxx]
> Gesendet: Montag, 25. Februar 2008 18:53
> An: Qt Interest List
> Betreff: Compiling UTF strings
>
> Hi All,
>
> Usually I'm writing my own Qt's projects in English then make
> translation for them, but yesterday I forced to make a quick project
> (deadline of my homework Approached), and wrote Unicode
> strings directly
> in the source files, then I shocked =-O
>
> All Unicode strings appeared in strange text format like Martian
> language huh :-P , as shown in the following images, although
> my source
> file have UTF-8 encoding.
>
> What's wrong?!
>
> http://img218.imageshack.us/img218/9651/01jt9.png
> http://img89.imageshack.us/img89/4062/02ru6.png
> http://img138.imageshack.us/img138/5845/03tz1.png
>
> --
> Best Regards تحياتي
> Muhammad Bashir Al-Noimi محمد بشير النعيمي
--
[ signature omitted ]
Message 3 in thread
Peter Prade wrote:
> As a hint, try to specify your encoding like this:
>
> QMessageBox::information(this, QString::fromUtf8("fancy-utf8-string"), QString::fromUtf8("more-utf8"));
>
> Cheers,
> Peter
>
Thanks Peter, nice hint
--
[ signature omitted ]