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

Default to C.UTF-8, allow fallback to C #2616

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

pmatilai
Copy link
Member

Mostly everything around us is UTF-8 these days, we need to get on with the times. Especially now that glibc >= 2.35 finally supports it too. Attempt to detect C.UTF-8 availability in cmake and prefer when available, fall back to C when not.

Fixes: #2587

@pmatilai
Copy link
Member Author

FWIW, the C.UTF-8 availability detection seems ugly and clumsy, and I have no idea whether it works on non-glibc (tested on Fedora 38). Better ideas welcome.

@pmatilai
Copy link
Member Author

Having slept on it, I wonder if we should just make C.UTF-8 the default because most (relevant) modern OS'es already have it, and just provide a cmake override for those that don't...

Mostly everything around us is UTF-8 these days, we need to get on with
the times. Especially now that glibc >= 2.35 finally supports it too.
Default to C.UTF-8 but allow disabling it via cmake option to fallback
to the traditional C locale instead.

Fixes: rpm-software-management#2587
@pmatilai
Copy link
Member Author

After sleeping some more on it, changed it to simply default to C.UTF-8 with an explicit override for trad. C for those who need it. It's much simpler and more reliable that way.

@pmatilai pmatilai changed the title Use C.UTF-8 instead of C if available Default to C.UTF-8, allow fallback to C Aug 23, 2023
@pmatilai pmatilai merged commit 3be76d7 into rpm-software-management:master Aug 23, 2023
2 checks passed
@pmatilai pmatilai deleted the cutf8 branch August 23, 2023 12:01
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.

rpmbuild: default to LANG=C.utf8 ?
1 participant