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

LC_ALL set to invalid value #26443

Closed
3 tasks done
lights0123 opened this issue Nov 11, 2020 · 4 comments · Fixed by #26507
Closed
3 tasks done

LC_ALL set to invalid value #26443

lights0123 opened this issue Nov 11, 2020 · 4 comments · Fixed by #26507

Comments

@lights0123
Copy link

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 9.3.4
  • Operating System:
    • Arch Linux
  • Last Known Working Electron version:
    • 9.3.3

Expected Behavior

❱ echo lang: $LANG lc_all: $LC_ALL
lang: en_US.UTF-8 lc_all:
❱ electron9 -i                    
> process.env.LC_ALL
undefined

Actual Behavior

❱ echo lang: $LANG lc_all: $LC_ALL
lang: en_US.UTF-8 lc_all:
❱ electron9 -i                    
> process.env.LC_ALL
'en_US'

en_US is not a valid locale—it has to be en_US.UTF-8, however, Electron overrides this, even if --lang=en_US.UTF-8 is passed or LC_ALL is set correctly when invoking Electron. With this invalid value, many C programs fail to run.

To Reproduce

Run the above commands.

Additional Information

Problem introduced in #26242

@codebytere
Copy link
Member

cc @zcbenz ☝🏻

@klarkc
Copy link

klarkc commented Nov 12, 2020

It broke VSCode terminal for some reason, locale in the terminal is reporting strange pt-BR nonexistent locale. My locale is actually pt_BR.UTF-8 (in any other terminal).

@angelsl
Copy link

angelsl commented Nov 13, 2020

Why is Electron playing with the locale environment variables? That is typically a system-wide setting, and Electron shouldn't be overriding it for itself. Definitely not on Linux. There is no guarantee that whatever locale Electron sets has been generated on the system. You can only use languages listed in locale -a. So you can't blindly set the locale variable.

Note also that locale names are also system-specific.

Portability Note: With the notable exception of the standard locale names ‘C’ and ‘POSIX’, locale names are system-specific.

@zcbenz zcbenz self-assigned this Nov 13, 2020
@jorgelaranjo
Copy link

Downgrade Electron microsoft/vscode#110322 (comment)

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

Successfully merging a pull request may close this issue.

6 participants