C++ Logo

liaison

Advanced search

Re: [wg14/wg21 liaison] [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?)

From: Niall Douglas <s_sourceforge_at_[hidden]>
Date: Wed, 14 Aug 2019 12:19:34 +0100
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

Received on 2019-08-14 06:21:37