C++ Logo

sg16

Advanced search

Re: [SG16] Locales, Encodings and Unicode

From: Lyberta <lyberta_at_[hidden]>
Date: Fri, 10 Jan 2020 22:10:00 +0000
Jens Maurer via SG16:
> I think a key observation here is that locale and encoding
> need to get a divorce. And that probably means std::locale
> needs to die (in its present shape and form).

> Whatever we do here, the programmer should have the ability
> to opt-out of any locale support (beyond "C") and any
> encoding conversion to keep the program footprint small for
> situations where advanced locale/encoding fun is not needed.

I think the clean way forward is to design Unicode (and Unicode only
part) in std::unicode namespace, then design new C++23/26 locales using
Unicode. Then do all other encodings on top of that.

Printing to terminal is the whole other can of worms.

I would also advise against standardizing std::text and std::text_view
before we figure out how to do containers and views using C++20 concepts
and ranges instead of Cpp17NamedRequirements.

Right now I'm trying to implement something akin to std2::vector and
will write a paper when I get results.


Received on 2020-01-10 16:13:03