You are not logged in.

#1 2020-11-24 13:38:34

volker_weissmann
Member
Registered: 2020-01-05
Posts: 71

[SOLVED] LC_ALL: cannot change locale (en-US): No such file or directo

Hello,

when I run "export LC_ALL=en-US", I get the warning:
bash: warning: setlocale: LC_ALL: cannot change locale (en-US): No such file or directory

any idea how to fix this?


(In case you want to ask why I want to run "export LC_ALL=en-US": This is what vs code runs if you open a terminal in it.)

Last edited by volker_weissmann (2020-11-26 20:56:53)

Offline

#2 2020-11-24 13:40:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,247

Re: [SOLVED] LC_ALL: cannot change locale (en-US): No such file or directo

You should not (... generally ...) do that and vs code should also not do that. Update your system the electron version that had this bug should be fixed.

That said to literally answer the question if that really would be what you wanted to do, the value you'd want to use is en_US check locale -a (... if that doesn't list en_US, you will want to generate it regardless it's an important fallback language)

Last edited by V1del (2020-11-24 13:43:20)

Offline

#3 2020-11-24 13:55:17

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,094

Re: [SOLVED] LC_ALL: cannot change locale (en-US): No such file or directo

Sadly vscode/electron recently removed the feature that allowed you to tell it not to mess with the locale hmm

Edit: might be fixed again in https://github.com/electron/electron/pull/26507

Last edited by Mr.Elendig (2020-11-24 13:57:19)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#4 2020-11-24 21:22:58

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] LC_ALL: cannot change locale (en-US): No such file or directo

Hmm, let me think when was the last time vim did this to me...


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2020-11-25 21:59:16

volker_weissmann
Member
Registered: 2020-01-05
Posts: 71

Re: [SOLVED] LC_ALL: cannot change locale (en-US): No such file or directo

V1del wrote:

You should not (... generally ...) do that and vs code should also not do that. Update your system the electron version that had this bug should be fixed.

That said to literally answer the question if that really would be what you wanted to do, the value you'd want to use is en_US check locale -a (... if that doesn't list en_US, you will want to generate it regardless it's an important fallback language)


Actually, I have en_US in the output of locale -a:

$ export LC_ALL=en-US
bash: warning: setlocale: LC_ALL: cannot change locale (en-US): No such file or directory
$ locale -a
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_COLLATE to default locale: No such file or directory
C
POSIX
de_DE.utf8
en_US
en_US.iso88591
en_US.utf8
$ sudo  locale-gen
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en-US)
Generating locales...
  en_US.UTF-8... done
  de_DE.UTF-8... done
  en_US.ISO-8859-1... done
error: Bad entry 'en_US '
Generation complete.
$ 

Last edited by volker_weissmann (2020-11-25 22:00:04)

Offline

#6 2020-11-25 22:09:35

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,755

Re: [SOLVED] LC_ALL: cannot change locale (en-US): No such file or directo

And again, en-US, and en_US are not the same thing.

Offline

#7 2020-11-26 14:47:42

volker_weissmann
Member
Registered: 2020-01-05
Posts: 71

Re: [SOLVED] LC_ALL: cannot change locale (en-US): No such file or directo

Scimmia wrote:

And again, en-US, and en_US are not the same thing.


The problem is that if I add en-US to /etc/locale.gen, I get "error: Bad entry 'en_US '" if I try to run locale-gen.

Offline

#8 2020-11-26 15:02:59

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 22,247

Re: [SOLVED] LC_ALL: cannot change locale (en-US): No such file or directo

Again, en-US is not a thing, and isn't correct and never has been. Instead of dancing around these semantics what's the actual problem you have? As said you should not set LC_ALL without good reason and vs code shouldn't either, if your system is not up to date that would explain this, there was an actual bug in electron.

Offline

#9 2020-11-26 20:56:27

volker_weissmann
Member
Registered: 2020-01-05
Posts: 71

Re: [SOLVED] LC_ALL: cannot change locale (en-US): No such file or directo

V1del wrote:

Again, en-US is not a thing, and isn't correct and never has been. Instead of dancing around these semantics what's the actual problem you have? As said you should not set LC_ALL without good reason and vs code shouldn't either, if your system is not up to date that would explain this, there was an actual bug in electron.

Understood. If I get this warning the next time, I will open a bug report for the software that tries to set this.

Offline

Board footer

Powered by FluxBB