C++ Logo

sg16

Advanced search

Re: [isocpp-sg16] Use cases for user construction of text_encoding by name

From: Henri Sivonen <hsivonen_at_[hidden]>
Date: Sun, 21 Jul 2024 23:21:16 +0300
What’s the canonical string name for Windows code page 949? What about 950? The pattern-following answers windows-949 and windows-950 would mean not using IANA naming as registered. (java.nio uses x-windows-949 and x-windows-950. See https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html . That page shows a problem with IANA names: Java started using x-windows-874, but then windows-874 was registered, but by then changing the canonical name would have been an API break.)

On Sun, Jul 21, 2024, at 10:14 PM, Tiago Freire wrote:
> I'm not a fan of mapping encodings to numbers.
> I don't t see a point of throwing at it every single encoding and the kitchen sink, most of them should be obsolete anyhow, pretty sure there will still be something that a user might want to do that would be left out.
> But these encodings have names, why not compile time strings as identifiers? Probably those names would be there regardless, why not have them pull double duty?
>
>
> *From:* SG16 <sg16-bounces_at_[hidden]> on behalf of Thiago Macieira via SG16 <sg16_at_[hidden]>
> *Sent:* Sunday, July 21, 2024 8:45:15 PM
> *To:* SG16 <sg16_at_[hidden]>; Henri Sivonen <hsivonen_at_[hidden]>
> *Cc:* Thiago Macieira <thiago_at_[hidden]>
> *Subject:* Re: [isocpp-sg16] Use cases for user construction of text_encoding by name
>
> On Sunday 21 July 2024 11:39:54 GMT-7 Henri Sivonen wrote:
> > > Is there such an 1:1 mapping?
> >
> > I believe not: Windows code pages 950 (Traditional Chinese) and 949 (Korean)
> > don't appear to have IANA registrations. They differ from Big5 and EUC-KR
> > in a way analogous to how windows-1252 differs from ISO-8859-1, how
> > windows-31j differs from Shift_JIS, and how GBK differs from GB2312.
>
> How about some other identifier roster that has such 1:1 mapping? We don't have
> to use the IANA registrations, we can specify one that works.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Principal Engineer - Intel DCAI Platform & System Engineering
>
>
>
> --
> SG16 mailing list
> SG16_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/sg16

--
Henri Sivonen

Received on 2024-07-21 20:21:39