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

Locale errors—in 2020! #80

Closed
ghost opened this issue May 11, 2020 · 3 comments
Closed

Locale errors—in 2020! #80

ghost opened this issue May 11, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented May 11, 2020

After upgrading to Mercurial 5.4 and Python 3, I get the following on macOS:

hg root
Fatal Python error: config_get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed
Python runtime state: preinitialized

I have LANG=en_GB.UTF-8 in my ~/.profile and Python 3/Mercurial work from the command line, but not from VSCode.

@ghost
Copy link
Author

ghost commented May 11, 2020

I think this has something to do with the LC_CTYPE setting. On the command line LC_CTYPE=en_GB.UTF-8 and LC_CTYPE=UTF-8 work, but LC_CTYPE=en_GB causes the the error. In the terminal, by default, without anything having been touched, the middle one holds. So it seems either the extension is touching LC_CTYPE, or something in the way VSCode is loading the environment (doesn't matter where it's started from) messes up LC_CTYPE.

@ghost
Copy link
Author

ghost commented May 11, 2020

I tried to create a wrapper script, to check the environment, but hg.path does not seem to be respected.

incidentist added a commit to incidentist/vscode-hg that referenced this issue May 21, 2020
@incidentist
Copy link
Collaborator

Fixed in 1.4.0.

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

No branches or pull requests

1 participant