C++ Logo

sg16

Advanced search

Re: Follow up on SG16 review of P2996R2 (Reflection for C++26)

From: Jens Maurer <jens.maurer_at_[hidden]>
Date: Tue, 30 Apr 2024 07:00:48 +0200
On 29/04/2024 21.39, Tom Honermann wrote:
> On 4/29/24 1:57 PM, Jens Maurer wrote:

>> It seems to me that UTF-8 is more important than UTF-16 and UTF-32.
> UTF-16 is very important on Windows and will remain so. However, UTF-16
> via wchar_t is much more important than UTF-16 via char16_t there. I
> think char16_t is only really important for ICU.

> older versions of some Microsoft
> libraries, I think including the standard library, were unable to
> accommodate encodings that require more than two bytes to encode a
> character and those libraries have been statically linked into many
> executables that remain in use according to their internal testing.

And those libraries are limited to UCS-2 anyway, according to your
description.

Jens


>> Going forward, maybe we want to establish guidance that we support
>> only basic transcoding involving UTF-16 and UTF-32, but do not
>> provide all library functionality for those (e.g. std::format,
>> std::to_chars etc.).
>
> I think that is reasonable. Given that we have a precedent, I think
> motivation for a change should be argued in a paper and should be
> stronger than, "we don't think we need it", particularly since, once
> support for UTF-8/char8_t is in place, it is almost trivial to add
> support for char16_t and char32_t. The existing standard libraries
> already have conversion routines.
>
> Tom.

Received on 2024-04-30 05:01:04