How to get cyrillic working in Qt Creator's console?
I have the following code:
@ QString pokus = QString::fromUtf8("студенты призвали потенциального кандидата");
qDebug() << "pokus: " << pokus;@
In the console it shows
pokus: "ÑÑÑÐ´ÐµÐ½ÑÑ Ð¿ÑÐ¸Ð·Ð²Ð°Ð»Ð¸ Ð¿Ð¾ÑÐµÐ½ÑÐ¸Ð°Ð»ÑÐ½Ð¾Ð³Ð¾ ÐºÐ°Ð½Ð´Ð¸Ð´Ð°ÑÐ°"
However, if show the QString in a dialog, it shows cyrillic characters properly. How can I make it work in console?
I'm on Ubuntu, developing an app for Blackberry 10.
There have been patches pushed to Qt Creator sources very recently, that could solve it. I suggest asking on Qt Creator mailing list & trying out the newest code (from GIT).
Well, compiling Qt Creator from source doesn't seem so trivial, but thanks anyway.
Just a matter of running qmake and make. And then waiting for 20 minutes.
Definitely, asking on the ML is faster and easier, so you can try that before compiling ;-)
You can grab a nightly build from "here":http://download.qt-project.org/snapshots/qtcreator/3.2.0-beta1/latest/
New discovery: it actually works properly in a normal "vanilla Qt" application. I made a basic widget-based app and inserted the above code. Cyrillic characters are shown nicely in Qt Creator 3.1.1.
I'll dig deeper when I get to my home computer.
It seems that cyrillic characters work in Application ouput only in Qt 5 applications. From my Qt Creator 3.1.1 I tried to make Qt 5 widget application, Qt 4 widget application and BB 10 app. Cyrillic output was shown only in Qt 5 one.
Transfer i/o through sh script, where to make code conversion.