When there's any errors in my project it looks like that:
How to fix that? I mean encoding, not errors.
When there's any errors in my project it looks like that:
How to fix that? I mean encoding, not errors.
If you use Visual Studio compiler with Qt Creator, message from compiler will be in DOS (866) encoding. Need set correct encoding Windows CP1251. I use special version jom.exe from here.
Version x86: jom.exe x86
Version x64: jom.exe x64
Copy utility in qt/bin. Then Tools->Options and find options "use jom instead nmake". Source.
It's possible to amend the problem by editing .pro file only. The console codepage is inherited when the console is inherited. So it's sufficient to change the console codepage for the make command. And that can be done with (somewhat) advanced qmake.
Insert this into your .pro file. It works for me.
QMAKE_EXTRA_TARGETS += before_build makefilehook
makefilehook.target = $(MAKEFILE)
makefilehook.depends = .beforebuild
PRE_TARGETDEPS += .beforebuild
before_build.target = .beforebuild
before_build.depends = FORCE
before_build.commands = chcp 1251
If you prefer Russian language read this post on my blog.
Better solution is here, cause not only jom can output such messages but link, nmake, copy, etc: http://codedchaos.blogspot.com/2012/09/qt-creator-windows.html
Need to use command:
chcp scode_page
Simple sample:
chcp 1251
To permanently change code page registry HKCU\Software\Microsoft\Command Processor
could be used. To run Qt Creator you may create bat file with following:
@echo off
reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /t reg_expand_sz /d "chcp 1251 1>nul" /f
C:\Qt\qtcreator-3.6.0\bin\qtcreator.exe
reg delete "HKCU\Software\Microsoft\Command Processor" /v AutoRun /f