why some characters are not recognized?
-
Hi,
I have a problem recognizing the letters of a regional language.
QTextCodec :: codecForName ("UTF-8") - does not help.
Although everything is fine in the database - Application Output does not recognize the characters I need - Ą-Ę-Ė-Į-Ū-Ų-Č and others.
I write:
QTextCodec::codecForName("UTF-8");
QString test = QString::fromUtf8("\u0104\u0118\u0116\u012e\u016a\u0172\u017d\u0160\u010c");
qDebug() << "should be: Ą-Ę-Ė-Į-Ū-Ų-Ž-Š-Č, actually shown: " <<test;
return 0;In Application Output I have:
Starting C:....build-Pope-Desktop_Qt_5_9_1_MinGW_32bit-Debug\debug\try.exe...
should be: A-E-E-I-U-U-Ž-Š-C, actually shown: "AEEIUUŽŠC"
Only 2 characters are displayed correctly.
What is the solution to this problem? -
Hi, this is an almost 10 year old bug/feature in Qt Creator
As you say, it's only a problem in Application Output, for example if you do a QLabel->setText() on the string it will display correctly.
Anyway the recommended workaround is to go to Tools/Options/Environment in Qt Creator's menu and change the "Text codec for tools" from "System" to something else... -
I installed QT on 3 computers - version QT 6.2.3, QT Creator - version 7.0.0. On one computer, everything works fine - and you don't even need to set UTF-8 there - even if you set the text codec for tools - LatinArabic - still shows the required characters. On the other two computers, including the one that previously failed to see the required characters, nothing can be done - the Ą-Č-Ę characters did not and do not show. Apparently the problem is somewhere else ... Thank you for paying attention to this issue