[Development] MSVC 2015 option /utf8: Qt only or everyone?

André Pönitz apoenitz at t-online.de
Wed May 11 18:55:03 CEST 2016


On Wed, May 11, 2016 at 01:19:33AM -0700, Thiago Macieira wrote:
> On quarta-feira, 11 de maio de 2016 07:59:38 PDT Lars Knoll wrote:
> > Finally!
> > 
> > We should certainly turn it on for Qt. 
> > 
> > User code is a bit more sensitive. What are we currently doing on
> > the other compilers? Are we assuming utf8 as the input encoding by
> > default? If yes, we should aim for consistency and turn it on for
> > user code on msvc2015 as well, but there should be an option to
> > disable it and we'd need to clearly document this in the Changelog. 
> 
> GCC and Clang on Unix systems already operate like this new MSVC
> option. They do that irrespective of what your locale settings are:
> sources are assumed to be UTF-8, period.

I don't see this for GCC 5.2.1 Linux for string literals, even with
-Wall It pretty much looks like they are put 1:1 into the object files,
no matter what the encoding is.

Clang issues a "warning: illegal character encoding in string
literal", but it's a just warning that can be switched off.

Judging from the top 20 hits in my favourite search engine the feature
is (a) controversial, and (b) there are still tons of 8-bit non-UTF8
encoded sources around. 

Andre'



More information about the Development mailing list