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

Improve when $LANG is set and expand the number of languages supported #80830

Merged
merged 7 commits into from
Sep 13, 2019

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Sep 12, 2019

Fixes #80072

The setting is now an enum instead of boolean and defaults to auto
which should provide better detection and not set in cases where it
shouldn't.

Fixes #80072
@Tyriar Tyriar added this to the September 2019 milestone Sep 12, 2019
@Tyriar Tyriar self-assigned this Sep 12, 2019
@go2sh
Copy link
Contributor

go2sh commented Sep 13, 2019

@Tyriar Is it possible to add a reference to the tasks.json documentation. I searched nearly two hours, why my LANG="" got overwritten with LANG="de_DE.UTF-8". Its quite annoying as I have to force the locale to English to get the diagnostic matcher working...

@Tyriar
Copy link
Member Author

Tyriar commented Sep 13, 2019

fyi @alexr00

@go2sh any reason why you don't do export LANG="en_US.UTF-8" in your ~/.bashrc?

@go2sh
Copy link
Contributor

go2sh commented Sep 14, 2019

German is my preferred language, so de_DE is okay for normal usage. But the gcc problem matcher only recognizes Error and not Fehler, so for this special case, I'd like the language to be changed. I use a special TaskDefinition with TaskProvider to supply Tasks with a ProcessExecution. So bashrc do not apply.

@Tyriar
Copy link
Member Author

Tyriar commented Sep 14, 2019

@go2sh I think for your case you're doing the right thing, You can either setLocaleVariables to false (which will be detectLocale to "off" soon from this PR) and handle it yourself or overriding the env just for tasks.

@go2sh
Copy link
Contributor

go2sh commented Sep 15, 2019

@Tyriar Thank you. I just wanted to make sure with comment, that the option (either the old or new own) gets mentioned in the documentation (tasks page and api page under the *ExecutionOptions). As extension developer, I got a lot of reports regarding the LANG environment variable and I spent a lot of time reading and debugging the code to find the config option.

Also I like the PR very much because now you have a change to override the var without changing the configuration (as auto is the default compared to true before). I implemented a check in my extension for the old config option to warn the user to enable it, when he tries to override the LANG var.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
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.

UTF-8 'ñÑ' cannot be written in the vscode terminal
2 participants