Skip to content

[text.encoding.id] Sort enumerators in ascending order #7899

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 28, 2025

Conversation

frederick-vs-ja
Copy link
Contributor

Some enumerators of std::text_encoding::id are listed out of order. It's probably better to sort them in ascending order.

Some enumerators of `std::text_encoding::id` are listed out of order. It's probably better to sort them in ascending order.
@Eisenwave
Copy link
Member

Seems like a simple editorial mistake; I couldn't find a pattern in the text encodings that would explain

 IBM423 = 2042,
 IBM424 = 2043,
 PC8CodePage437 = 2011,
 IBM500 = 2044,
 IBM851 = 2045,

@cor3ntin can you confirm this was just a slip-up?

@cor3ntin
Copy link
Contributor

The PR is consistent with the RFC, so this seems fine https://www.rfc-editor.org/rfc/rfc3808.html
(The reason for the original order is that PC8CodePage437 is the primary name for IBM437 - but I can't remember exactly how I produced the list order)

@jensmaurer jensmaurer merged commit a770261 into cplusplus:main May 28, 2025
0 of 2 checks passed
@frederick-vs-ja frederick-vs-ja deleted the text-encoding-id-ord branch May 28, 2025 10:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants