This is exactly why names exist and are important.IANA give you a set of registered names that can be used for interoperability (although, as Henri pointed out, the interpretation of these names can in some cases vary by platforms, and mapping from names to an actual mapping requires cares)Users provided names, along with aliases let users and platforms support non-registered, non-portable encodings.On Sun, Jul 21, 2024 at 10:21 PM Henri Sivonen via SG16 <sg16@lists.isocpp.org> wrote: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?--Henri Sivonen--SG16 mailing list