QString global variable and coding problem
I have a problem with QString which is a global variable. Coding of this variable is wrong. File is in UTF8. Here is example code:
- #include <QtCore/QCoreApplication>
- #include <QTextCodec>
- #include <QDebug>
- int main(int argc, char *argv[])
- {
- qDebug() << "Global: " << global; // print Global: "Ä ÄÅÄź" - it's wrong
- qDebug() << "Inside: " << inside; // print Inside: "ąęśćź" - good
- return a.exec();
- }
How to solve it?
3 replies
You must log in to post a reply. Not a member yet? Register here!

