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

Fix locale hack 2: Now detects correct C.utf format #101

Merged
merged 3 commits into from
Dec 20, 2023

Conversation

rankynbass
Copy link
Contributor

Check for valid C locale by running process. Exact command is sh -c "locale -a 2>/dev/null | grep -i utf", which should execute on any Unix system without throwing an error in dotnet. It then selects the first valid entry that starts with "C." (not case sensitive). This will deal with cases of C.utf8, C.UTF-8, c.utf-8, etc.

If there is no value for the Ctype, the hack will be disabled, and hack text will change to let the user know that they'll have to set it manually.

If the users's LANG is already set to a UTF-8 type and they enable the hack, it will warn that the hack probably isn't needed, but the hack will still function.

@reiichi001 reiichi001 merged commit 9438460 into goatcorp:main Dec 20, 2023
1 check passed
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.

2 participants