[Development] Shall we turn on /utf-8 compiler option when build qt for Windows?

Edward, Welbourne edward.welbourne at qt.io
Mon Jan 30 10:58:30 CET 2017

Liang Jian (29 January 2017 05:13):
>    Start from qt-5.8 I can't build qt anymore under Windows(simplified
> chinese locale). Since there is a file
> src/plugins/generic/tuiotouch/qtuiohandler.cpp which contain
> non-latin-1 character, msvc2015 assume the source code's character set
> should be CP936 which make the complilation fail.

Stray thought: this sounds like something that would be fixed (on Unix)
by setting the locale-controlling environment variables, so that your
build happens in a local using UTF-8 as its encoding; hopefully, that
would then coax the compiler into using this by default and not getting
upset.  I'm not sure how that works on MS-Windows, but I'd just set
LANG=en.UTF-8 in my environment on any Unix; this would then only affect
the process in which I set it.  So it might be worth seeing if you can
do that (or something equivalent) for the process that runs configure &&
make for you.

If that *does* work ... perhaps we should hack this into our Makefiles,


More information about the Development mailing list