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

mcpp: fix set_encoding() to understand C.UTF-8 #18288

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

gt7-void
Copy link
Contributor

Function set_encoding() finds the encoding name by splitting a locale of the form en_US.UTF-8 at the period, but only if the leading part is exactly 5 characters long.

$ LC_ALL=C.UTF-8 mcpp /dev/null
/dev/null:0: warning: Unknown encoding: C.UTF-8
    #line 1 "/dev/null"

This patch changes the behaviour to split at the first period instead.

This will also fix a warning in xrdb:

$ LC_ALL=C.UTF-8 xrdb -merge /dev/null
/dev/null:0: warning: Unknown encoding: C.UTF-8

@pullmoll pullmoll merged commit 03544d1 into void-linux:master Jan 17, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants