How to set the text encoding within the "Application Output" window?
Moved
Unsolved
Qt Creator and other tools
-
I'm a QT developer from China, so the default console encoding of my Windows11 is GBK, but the encoding of my source file is UTF-8, it doesn't show the same text(For example it shows "Hello, 世界!" in source file but "Hello, 涓栫晫!" in the "Application Output" windows), how to solve this problem?
Such thing like use "CHCP 65001" in the code or setting the encoding of the "Application Output" windows?
-
The 'Application Output' is a debug output window. I'm not aware that you can set a text codec there.
-
You need to do two things:
- Enable UTF-8 for "Language for non-Unicode programs"
- Set UTF-8 for Qt Creator's codec for tools
This works starting with Qt Creator 4.15
- Enable UTF-8 for "Language for non-Unicode programs"
-
https://bugreports.qt.io/browse/QTCREATORBUG-24776 has details about the feature.
-
It is documented here: https://doc.qt.io/qtcreator/creator-output-panes.html