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

André Pönitz apoenitz at t-online.de
Mon Jan 30 18:29:05 CET 2017


On Sun, Jan 29, 2017 at 05:21:57PM -0800, Thiago Macieira wrote:
> On domingo, 29 de janeiro de 2017 10:33:39 PST André Pönitz wrote:
> > We should remove non-ASCII characters from the sources if they cause
> > problems.
> 
> We've had this discussion. One of our largest contributors has a full legal 
> name that doesn't fit in ASCII.
> 
> 	Klarälvdalens Datakonsult AB

That's the very reason why I wrote:
 
> > If some non-ASCII is unproblematic (like the 'ä' in some copyright lines)
> > on all supported compilers, that's fine to have
> 
> That's usually one of the problematic ones.

Not in the case here, and not in the other case attempting to fix build
problems recently, namely https://codereview.qt-project.org/#/c/173622/
which is, by the way, *still* in a state inconsistent with the project
governance rules.
 
> Not on this file, though:
> 
>     qCDebug(lcTuioSet) << "Processing SET for token " << classId << id << " @ 
> " << x << y << "∡" << angle <<
> 
> That's easy to fix by using "\342\210\241" instead.

The fix I would use is something like

     qCDebug(lcTuioSet) << "Processing SET for token " << classId << id
        << " @ " << x << y << "angle:" << angle << ...

There is no need to use non-ASCII here at all. "\nnn" is fine in case
where \nnn is *really* needed, e.g. some auto tests.

> So, we should:
>  a) still avoid non-ASCII in our source files, aside from comments

Yes.

>  b) allow non-ASCII in comments, as needed

If *really* needed, or proven to be no problem in practice.

The mentioning of "Klarälvdalens" is a red herring in predecessors of
this discussion.  The 'ä' in the comments is not a problem in the two
controversial changes.  *If* it turns out to be a problem elsewhere,
which I don't expect, there needs to be an explanation why a transcription
of "ä" can be considered a more severe "legal issue" than the "legal
issue" originating from transcribing "©" as "(C)" in the same line. 

>  c) turn the -utf-8 option on for MSVC2015U3.

Yes.

Andre'



More information about the Development mailing list