C++ Logo

SG16

Advanced search

Subject: Re: [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: 2019-08-14 06:19:34


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


SG16 list run by sg16-owner@lists.isocpp.org