Qt-interest Archive, April 2008
QTextBrowser and unicode latin1 supplement block
Message 1 in thread
Hi,
It seems that QTextBrowser won't display unicode characters in the
range U+0080...U+009F unless they're expressed as HTML entities.
Sample code with U+0093 (left double quotation mark):
#include <QTextBrowser>
#include <QApplication>
int main(int argc, char** argv)
{
QApplication a(argc, argv);
QTextBrowser* w = new QTextBrowser(NULL);
w->setHtml(QString("<html><body>") +
QString("<p>U+0093 as HTML entity: “") +
QString("<p>U+0093 as QChar:")+QChar(0x93) +
QString("</body></html>"));
w->show();
a.exec();
return 0;
}
With Qt-4.3.4, the rendering is OK for the HTML entity but not for
QChar(0x93). What would be the rationale for this difference?
Regards,
--
[ signature omitted ]