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

Change command variable assignments to use LC_ALL #549

Merged
merged 1 commit into from
May 22, 2018
Merged

Change command variable assignments to use LC_ALL #549

merged 1 commit into from
May 22, 2018

Conversation

Rycieos
Copy link
Collaborator

@Rycieos Rycieos commented May 21, 2018

This is a fix for #548.

The docs for this mechanic can be found here: https://www.gnu.org/software/gettext/manual/html_node/Locale-Environment-Variables.html

LC_ALL and specific locale variables like LC_NUMERIC override LANG, so
if a user sets a locale variable like LC_NUMERIC in their shell, using
LANG as a command variable assignment won't change anything. This causes
the command to output in the users locale and could cause parsing errors.

In places where we need the output to be in ANSI C format, set LC_ALL=C
instead of LANG.

On line 1066, both LANG and LC_ALL don't need to be set, since LC_ALL
takes precedence. The change to include both was done in commit
0fb81d5.

LC_ALL and specific locale variables like LC_NUMERIC override LANG, so
if a user sets a locale variable like LC_NUMERIC in their shell, using
LANG as a command variable assignment won't change anything. This causes
the command to output in the users local and could cause parsing errors.

In places where we need the output to be in ANSI C format, set LC_ALL=C
instead of LANG.

On line 1066, both LANG and LC_ALL don't need to be set, since LC_ALL
takes precedence. The change to include both was done in commit
0fb81d5.

Fixes #548
@dolmen dolmen merged commit eda83ef into liquidprompt:master May 22, 2018
@Rycieos Rycieos deleted the lang_fix branch May 23, 2018 13:28
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.

None yet

2 participants