[SG16-Unicode] [isocpp-core] Source file encoding (was: What is the proper term for the locale dependent run-time character set/encoding used for the character classification and conversion functions?)
Niall Douglas
s_sourceforge at nedprod.com
Wed Aug 14 13:19:34 CEST 2019
Lots of great points earlier. I mostly agree with them.
> I would support such a thing. All other languages went there and it
> works great for them. Python will for example assume utf8 in the absence
> of pragma.
This will be probably an underappreciated point: Python started off
pre-Unicode, same as C++, and later on switched the default from "your
current C locale" (i.e. only 7-bit ASCII was portable) into utf-8.
Their world did not end. Some users complained, sure, but because it was
announced in advance, and one could pragma opt-out, it was fine.
C++ could do with being bolder in becoming simpler and less surprising
for end users. It is not unreasonable for a German to type an umlaut
into a string literal, and expect that C++ source code to be portable
and unsurprising by default.
Niall
More information about the Unicode
mailing list