C++ Logo

sg16

Advanced search

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

From: Corentin Jabot <corentinjabot_at_[hidden]>
Date: Thu, 6 May 2021 17:57:44 +0200
Alisdair: Done!
Jens: I shuffled things around, hopefully, that helps. I think we want to
keep the definition.

Thiago: We achieve 2 things: all compilers will have to support utf8
(including IBMs compiler etc) 2/ they will handle it correctly - rather
than randomly insert replacement characters in phase 1 like some currently
do.
The hurdle to "utf8 is the default" is that it is out of scope of the
standard 2/existing code 3/automatic detection is problematic. We do not
want to force people to use BOM everywhere.
Tom is working on some kind of mechanism to put in the source file what the
encoding of that file is, but, I don't think using that for utf8 is the
right default either as most code is utf8 already.

So the solution is to do exactly what Qt does, put the flag in the build
system!

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

Received on 2021-05-06 10:58:02