You are not logged in.

#1 2020-11-21 10:20:12

volker.raschek
Member
From: Trier
Registered: 2017-12-17
Posts: 6

VSCode: LC_ALL can not change locale (de)

Hello folks,
since last week I get the following error message in the terminal of visual studio code 

bash: warning: setlocale: LC_ALL: cannot change locale (de)
markus@markus-pc:~$

This confuses me a lot, because the error message has never occurred before. I have checked the locale and recompiled.

$ cat /etc/locale.gen | grep --perl-regexp '^[^#]'
de_DE.UTF-8 UTF-8
en_US.UTF-8 UTF-8
$ sudo locale-gen
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (de)
Generating locales...
  de_DE.UTF-8... done
  en_US.UTF-8... done
Generation complete.

Additionally, I verified the content of the file /etc/locale.conf. The file seems to be correct in my opinion. Furthermore I verified the settings by localectl.

$ cat /etc/locale.conf 
LANG=de_DE.UTF-8
$ localectl 
   System Locale: LANG=de_DE.UTF-8
       VC Keymap: de-latin1
      X11 Layout: n/a

When I execute locale, all LC variables are printed out on standard out. The value 'de' seems correct for me.

$ locale
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=de_DE.UTF-8
LC_CTYPE="de"
LC_NUMERIC="de"
LC_TIME="de"
LC_COLLATE="de"
LC_MONETARY="de"
LC_MESSAGES="de"
LC_PAPER="de"
LC_NAME="de"
LC_ADDRESS="de"
LC_TELEPHONE="de"
LC_MEASUREMENT="de"
LC_IDENTIFICATION="de"
LC_ALL=de

Has anyone an idea, how I can fix this behavior?

Volker

Last edited by volker.raschek (2020-11-21 10:51:36)

Offline

#2 2020-11-21 10:27:44

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 11,259

Re: VSCode: LC_ALL can not change locale (de)

It's a bug in the current electron version used by vs code: https://bugs.archlinux.org/task/68629

Offline

#3 2020-11-21 10:53:03

volker.raschek
Member
From: Trier
Registered: 2017-12-17
Posts: 6

Re: VSCode: LC_ALL can not change locale (de)

Ahaa, thanks a lot for this information and the link to the issue.

Offline

#4 2020-11-21 12:11:11

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,395

Re: VSCode: LC_ALL can not change locale (de)

Thanks for the bug link. Strangely enough on my system, the error is

bash: warning: setlocale: LC_ALL: cannot change locale (en-GB)

which is most strange since on my system en-GB is not used at all.

$ localectl list-locales
en_AU.UTF-8
en_US.UTF-8

Offline

#5 2020-11-22 03:56:13

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,395

Re: VSCode: LC_ALL can not change locale (de)

Thanks. Seems to be fixed in electron9-9.3.4-2

Last edited by skunktrader (2020-11-22 03:56:36)

Offline

Board footer

Powered by FluxBB