Latin-1 characters not recognized anymore in QT 5.3 ?
-
Hi,
I had this code below in Visual 2005 and QT 4.8 :
@
QDockWidget* pDockOutput = new QDockWidget(tr("Sortie de la tâche 1"), this);
@
I compile it with Visual 2013 and QT 5.3 and the "â" is replaced by a "?" in my DialogBox.
I tried this to correct but it doesn't work :
@
QTextCodec::setCodecForLocale(QTextCodec::codecForName("ISO 8859-1"));
QString name = "Sortie de la tâche 1";
QByteArray latin1;
QByteArray encodedString1 = latin1.append(name.toLatin1());
QDockWidget* pDockOutput = new QDockWidget(encodedString1, this);
@
I tried a lot of différent things : no good :(Any idea ?
Thank U
Romu
-
Try trUtf8(), although it should be obsolete in Qt 5. Qt 5 expects (well, let's put it more strongly: requires) source code to be encoded in UTF-8.