C++ Logo

sg16

Advanced search

Re: [SG16] P2295R3 Support for UTF-8 as a portable source file encoding

From: Thiago Macieira <thiago_at_[hidden]>
Date: Thu, 06 May 2021 11:56:14 -0700
On Thursday, 6 May 2021 08:57:44 PDT Corentin Jabot wrote:
> So the solution is to do exactly what Qt does, put the flag in the build
> system!

Sure, but what flag is that? The standard can't mandate what flag it is. It
doesn't even acknowledge the existence of flags.

As it is, IBM can comply with the paper and later the standard but still not
make UTF-8 available for our use on EBCDIC machines. "The compiler does
support it when we tested it, we just didn't give you a flag to use the
feautre"

> We also hope that this will send a signal to users "you should really
> consider using utf-8" !

Sure, but the point is that with the last mile missing, the feature is not
useful. If I can't *use* UTF-8, it really makes no difference that the
compiler supports it. You could mandate that every developer have a rubber
duck at home in order to write standards-compliant C++, but unless you come to
audit my home, how would you know that my code is compliant?

What I want is to share my file with anyone and know that they will compile on
their system, with their compiler and get the string literals that I had meant
for them to get. I guess this is the "Tom is working on some kind of mechanism
to put in the source file what the encoding of that file is" part of your
email.

/Divide et conquera/ and all, but I'd like to see that other part.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2021-05-06 13:56:20