C++ Logo

sg16

Advanced search

Re: [isocpp-sg16] Unicode an conversion facets

From: Tom Honermann <tom_at_[hidden]>
Date: Fri, 2 May 2025 11:03:39 -0400
On 5/1/25 11:21 AM, Alisdair Meredith wrote:
> Thanks Tom.
>
> I will admit to mild confusion on the rationale for keeping the code
> conversion facets,
> unless we also want to withdraw support for adopting
> https://wg21.link/P2783 for C++26
> as well?
I don't see any reason to change direction for https://wg21.link/P2783
for C++26. The facets removed by that paper have been deprecated for
multiple standardization cycles. The new concern with removing the
charN_t <-> char8_t facets is that we haven't had a deprecation cycle
and that we (unexpectedly) found some uses in the wild.
>
> Could I request guidance on what a replacement facility would look
> like, given the
> current facility is built to support a framework based on runtime locales?

There are several relevant proposals.

  * WG14 N3366
    <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3366.htm>:
    Restartable Functions for Efficient Character Conversions
  * P1629 <https://wg21.link/p1629>: Standard Text Encoding
  * P2728 <https://wg21.link/p2728>: Unicode in the Library, Part 1: UTF
    Transcoding

>
> I understand that we do not want to remove something without a
> replacement, but
> we will need a whole new text framework where character encoding is
> independent
> of locale that do not have today. Mixing Unicode with runtime locales
> is a recipe for
> text corruption, with no viable error handling in our current framework.

I agree. My perception of the consensus is that we favor removal (with
or without a replacement) in this case so long as there is a deprecation
cycle. We'll, of course, re-poll removal again pending a paper for C++29
or later that proposes removal. I imagine you'll provide us such an
opportunity 😉

Tom.

>
> AlisdairM
>
>> On Apr 23, 2025, at 11:22 PM, Tom Honermann <tom_at_[hidden]> wrote:
>>
>> Thank you to everyone that attended today.
>>
>> WG21 members can find the draft meeting summary with poll results at
>> https://wiki.edg.com/bin/view/Wg21telecons2025/SG16Teleconference2025-04-23.
>>
>> Tom.
>>
>

Received on 2025-05-02 15:03:46