PDA

View Full Version : Special characters in Html blocks



giusepped
27th October 2008, 07:36
I have to put an html-like strings inside a QTextEdit.
In my string there is a special character (e.g. "città ").
But in the TextEdit only a strange character appears: cittA

Any suggestion?

aamer4yu
27th October 2008, 07:42
How are you setting the string on text edit ??
are u using setHtml or setPlainText ?

giusepped
27th October 2008, 07:48
Yes, I am setting it via setHtml.
G

wysota
27th October 2008, 09:09
Are you using a proper encoding? To omit problems with encodings it is best to use an html entity here, like "´".

spirit
27th October 2008, 09:13
maybe this function will help you Qt::escape (http://doc.trolltech.com/4.4/qt.html#escape)