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

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

On Wed, May 11, 2016 at 07:59:38AM +0000, Lars Knoll wrote:
> Finally!
> We should certainly turn it on for Qt. 

TBH, I don't see much of an advantage. Qt sources are (or should
have been) 7-bit clean and this still looks like a sensible "least
surprise" approach in general for any intended-to-be-portable code base.

I understand that being able to use UTF-8 could make some tests
more readable, so I am not really opposed to the idea, it's just
that it doesn't look like a big win in total.

> 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. 

One question is what happens with files that have non-uniform
encodings in comments which seemed to be a rather common phenomenon
at a time. It's unclear to me after reading the blog post.
I don't know how modern MSVC react to them, but it used
to just ignore any junk in comments (like one \author entry with
Latin1 encoded umlauts and the next one with UTF-8 encoding)

If using that switch means that such code suddenly fails to compile
we should not enforce it on user code.


More information about the Development mailing list