Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

introduce encoding_is_utf8() internal #2781

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

dankamongmen
Copy link
Owner

apparently _nl_normalize_charset() of glibc removes everything but alnums, and converts to lowercase.
replace strcmp() against "UTF-8" with encoding_is_utf8(), which matches this behavior, and supports the optional "cs" ("character set") prefix.

Closes #2780, reported by @barracuda156.

See https://github.com/bminor/glibc/blob/5f72f9800b250410cad3abfeeb09469ef12b2438/intl/l10nflist.c#L330-L334 and https://serverfault.com/questions/616744/is-there-a-difference-between-en-us-utf8-and-en-us-utf-8

apparently _nl_normalize_charset() of glibc removes
everything but alnums, and converts to lowercase.
replace strcmp() against "UTF-8" with encoding_is_utf8(),
which matches this behavior, and supports the optional
"cs" ("character set") prefix.

Closes #2780
@dankamongmen
Copy link
Owner Author

@dankamongmen dankamongmen merged commit 9845b5b into master Jun 5, 2024
2 of 4 checks passed
@dankamongmen dankamongmen deleted the dankamongmen/lowercase-locale branch June 5, 2024 03:44
@dankamongmen
Copy link
Owner Author

this closed #2779 , not #2780

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ncmetric uses bullshit detect_utf8()
1 participant