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

André Pönitz apoenitz at t-online.de
Thu Feb 2 18:23:07 CET 2017


On Thu, Feb 02, 2017 at 04:12:37PM +0100, Olivier Goffart wrote:
> On Montag, 30. Januar 2017 08:32:50 CET Thiago Macieira wrote:
> > On segunda-feira, 30 de janeiro de 2017 14:43:22 PST Konstantin Tokarev 
> wrote:
> > > What about Intel? (IIRC they use EDG frontend, aren't they?)
> > 
> > icc on Mac and Windows operates like GCC and Clang.
> > 
> > I'll check icl.exe on Windows. It is supposed to operate like MSVC, but it
> > might have some other options or have never complained.
> 
> How about unicode in the identifiers?  ☺

> 
> Code like this:
> 
>  const char andré[] = u8"andré";
>  int δx = -1;
> 
> This is valid C++11, but even GCC can't compile this code. (Works with clang)
> I know this is out of topic, as we are mostly interested in comments and 
> string literal. 
> 
> My opinion is that unicode in the source code in the comments or string has 
> some value as the way we express the programs. And so if the compiler we 
> support can handle it, we should allow it. The problem at hand seems to be 
> only with MSVC 2015 which shows a warning if we don't pass the /utf8 command. 
> So let's just pass that command.
> 
> And how about QML?
> Why can't I write such code? ...
> 	André { anchors.fill:parent; }

I somehow missed the memo announcing the start of the ongoing
competition of how to use sensible concepts (UTF-8 presumably
counts as such) in the most insensible way.

Similarly I missed the memo anouncing me as the referee of said
competition, but since I am in this position now, I feel obliged 
to have a look at the submissions so far nevertheless:


The idea of making log messages effectively ungreppable by using single
characters from unicode ranges that common people do not even know to
exist is pretty convincing, especially for a newcomer in the arena.
Nice try. The main problem is of course that it does not really break
the build process as such, but with the moon nearing its first quarter
that's clearly excused.

Spicing sources with funny characters to make them uncompilable in some
environments is perhaps a bit more efficient, we clearly see a
professional submitter here. However, the idea is fairly unimaginative
in comparision, that deficiency is also not really ironed out by the
quite creative reasoning with legal arguments in the neighbourhood.

Now, the unicode identifier idea, a.k.a. restrict editing of sources to
people who know how to map the few keys of their keyboard to the full
unicode range by heart is, regarding wiliness, certainly on par with the
broken log idea.  In fact, I'd give extra points for opening the stage
for an awful lot of possible extra bikeshedding, like, for instance in
the area of combining marks, canonical equivalence, positional variants
etc.

So, that would be the winner, but since it comes from someone who
doesn't even have a single accent or umlaut in his real name, i.e.
someone who was never truly exposed to the parallel worlds outside the
7-bit universe, I am afraid I have to disqualify this submission out
of spite on purely subjective grounds. Tough luck.


So, the final winner, for eternity, is --- tata --- Broken Logs!


Now, of course, this here is just today's eternal result. As usual
within the project, the competition will continue for an unlimited period
of time, every now and then new final eternal winners will be announced,
and the competition re-opens automatically whenever a someone or somebot
manages to send a reply to this thread.

Andre'



More information about the Development mailing list