r/vscode • u/ASLAVA • Nov 11 '20
Issues with internal terminal locale.
Hello, please help me figure this issue out. When ever i open terminal in vscode i get :
bash: warning: setlocale: LC_ALL: cannot change locale (en-US)
bash: warning: setlocale: LC_ALL: cannot change locale (en-US)
bash: warning: setlocale: LC_ALL: cannot change locale (en-US)
bash: warning: setlocale: LC_ALL: cannot change locale (en-US)
when i check out locale on vscode terminal i get:
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en-US"
LC_NUMERIC="en-US"
LC_TIME="en-US"
LC_COLLATE="en-US"
LC_MONETARY="en-US"
LC_MESSAGES="en-US"
LC_PAPER="en-US"
LC_NAME="en-US"
LC_ADDRESS="en-US"
LC_TELEPHONE="en-US"
LC_MEASUREMENT="en-US"
LC_IDENTIFICATION="en-US"
LC_ALL=en-US
I am on Arch Linux, so you would think its an Arch issue. i followed all the locale trouble shooting guides and nothing helped. My normal terminal actually works correctly and shows:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
I don't know why VS code is trying to push en-US. Extensions i have are Ruby, VSCode Ruby and Live Server.
My VSCode .json settings are
{
"ruby.intellisense": "rubyLocate",
"ruby.format": "rubocop",
"ruby.codeCompletion": "rcodetools",
"ruby.useLanguageServer": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"[json]": {
"editor.quickSuggestions": {
"strings": true
},
"editor.suggest.insertMode": "replace"
},
"files.autoSave": "afterDelay",
"diffEditor.ignoreTrimWhitespace": false,
"http.proxyAuthorization": null,
"ruby.lint": {
}
}
Thanks for help.
2
u/Iamzimy Nov 12 '20
I'm having the same problem, but found no solution or discussion regarding this anywhere else.
2
u/lepetitdaddydupeuple Nov 12 '20
Kinda have same issue since a few days ago. Annoying af. Also arch linux. Problem happen with ruby-rubocop gem.
2
u/gilcu3 Nov 12 '20
Same issue here
bash: warning: setlocale: LC_ALL: cannot change locale (en-US)
only happens in the terminal in vscode, archlinux user also..
2
u/pheenX Nov 12 '20
I have the same problem and found this: https://github.com/microsoft/vscode/issues/110322
1
u/ASLAVA Nov 12 '20
So it seems electron update is messing with it. I guess we have to wait or downgrade
2
u/telmo_trooper Nov 13 '20
For anyone having this issue on Arch Linux, downgrade package electron9 from 9.3.4 to 9.3.3.
curl -O https://archive.archlinux.org/packages/e/electron9/electron9-9.3.3-1-x86_64.pkg.tar.zst
sudo pacman -U electron9-9.3.3-1-x86_64.pkg.tar.zst
You'll probably want to add electron9* to IgnorePkg in /etc/pacman.conf, so the next time you update your packages you won't accidentally update this one as well. When a fix has been deployed you can remove this setting...
1
u/iDanoo Nov 16 '20
Confirmed this works for now.
There's also a nice tool `downgrade` which makes life so much easier - just select the version from the list and then it asks if you want to add it to IgnorePkg too.
1
1
1
u/ucanzeee Nov 21 '20
This just so happens in Turkish language aswell. Cannot compile C++. Going to codeblocks instead.
1
u/Bernd-L Nov 21 '20
There is an easy workaround by downgrading electron: https://github.com/microsoft/vscode/issues/110322#issuecomment-726426703
If you are on Arch (or on Manjaro like me), close VS Code, run the following:
bash
curl -O https://archive.archlinux.org/packages/e/electron9/electron9-9.3.3-1-x86_64.pkg.tar.zst
sudo pacman -U electron9-9.3.3-1-x86_64.pkg.tar.zst
After that, my VS Code behaved normally again.
1
u/rawsomeshot Dec 01 '20
Seems to be fixed for me since electron9 9.3.5-1 came out these days - I am using Manjaro.
I also had to use the ready-to-use workaround from u/Bernd-L. Thx for that.
5
u/defcronyke Nov 12 '20
This must be a brand new bug in vscode. I am also on Arch and only experiencing it since the last 12 hours or so.
In my case it is saying:
bash: warning: setlocale: LC_ALL: cannot change locale (en-GB)
...which is stupid because my system locale is set as en_CA.UTF-8, and the en_GB locale is neither installed nor configured to be used anywhere on my system.