Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Qt 5 and accented characters

$
0
0
Hi. I’m porting my aplication from Qt 4.7.3 to Qt 5.2.0 and I have this problem: the accented characters (eg é à ò) are sometimes drawn with a “question mark symbol”. This appens when the text is taken directly from the source code, eg painter->drawText(0, 0, "Città"); painter->drawText(0, 0, QString("Città")); or also with tr("Città") if the sentence is let untraslated. In this case also in Qt Linguist I see the “question mark symbol” instead of the accented character. Instead if the text is translated (with accented characters in the translation) they are drawn correcly. Also if I draw a text from a variable that takes the text eg from user input, it works. It seems that these characters are not recognized properly from source code. With Qt 4 all worked perfecly. I have built Qt 5 from git using Visual Studio 2008, without ICU. I read that ICU is used for unicode support, but I don’t know if it is needed in this case. I build my application with Visual Studio 2008, using the old Visual Studio project that worked with Qt 4. Thank you for help.

Viewing all articles
Browse latest Browse all 13965