You are not logged in.

#1 2018-09-03 09:23:21

Tim.Hilt
Member
Registered: 2018-06-16
Posts: 16

LC_ALL=C is set, no idea why

I‘m using st, the simple-terminal or suckless-terminal, which is a terminal with Unicode-support.

I have two machines, both run Arch Linux with basically the same system settings but i only get Unicode-support on the old machine!

After some investigation i think that it has something to do with my locales, but i‘m not entirely sure.

running locale gives:

    [tim@x1carbon: ~]$ locale
    LANG=en_DE.UTF-8
    LC_CTYPE="C"
    LC_NUMERIC="C"
    LC_TIME="C"
    LC_COLLATE="C"
    LC_MONETARY="C"
    LC_MESSAGES="C"
    LC_PAPER="C"
    LC_NAME="C"
    LC_ADDRESS="C"
    LC_TELEPHONE="C"
    LC_MEASUREMENT="C"
    LC_IDENTIFICATION="C"
    LC_ALL=C

from my understanding, that means, everything that is wrote in "..." is set implicitly, so the only explicitly set locales would be LANG and LC_ALL.

I've set LANG=de_DE.UTF-8 in /etc/locale.conf.

    [tim@x1carbon: ~]$ cat /etc/locale.conf
    LANG=de_DE.UTF-8
    LC_COLLATE=C
    LANGUAGE=en_US.UTF-8

but i don't remember setting LC_ALL at all (on my old machine that variable is just empty when i run locale)!

I ran sudo grep -rnw '/usr/' -e 'LC_.*=C' (a search pattern that looks through every file in /usr/-directory) which outputs a lot of scripts and files containing LC_ALL=C, but in most cases i guess the existing programs were just reading my set LC_ALL-variable and adding matching variables to their scripts.

I can't find, where i have actually set this variable and i might be mistaken with my understanding, that that's the reason of the false rendering but still: Setting LC_ALL to a false locale can cause a lot of other issues i think.

Furthermore, localectl status puts out:

    [tim@x1carbon: ~]$ localectl status
       System Locale: LANG=de_DE.UTF-8
                      LANGUAGE=en_US.UTF-8
                      LC_COLLATE=C
           VC Keymap: de-latin1
          X11 Layout: n/a

...which is the same ouput as on the working machine.

I have piped the output of the grep-command to a log file and i can upload this file somewhere, but i don't know how to do that properly since there was no reason for me to do so yet.

Offline

#2 2018-09-03 09:38:53

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: LC_ALL=C is set, no idea why

I only have

/etc/locale.conf: LANG=de_DE.utf8

and then:

$ locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=

I suspect, that systemd-localed.service tries to guess the rest from what it has. Since you have different locales, it might guess C for the rest. Might, suspect, grain of salt.

Offline

#3 2018-09-03 09:50:54

Tim.Hilt
Member
Registered: 2018-06-16
Posts: 16

Re: LC_ALL=C is set, no idea why

Awebb wrote:

I suspect, that systemd-localed.service tries to guess the rest from what it has. Since you have different locales, it might guess C for the rest. Might, suspect, grain of salt.

Unfortunately that's not the case. i edited this line out and rebooted, but running locale still gives the same ouput.

Last edited by Tim.Hilt (2018-09-03 09:51:10)

Offline

#4 2018-09-03 11:23:52

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: LC_ALL=C is set, no idea why

What about this "LC_COLLATE=C"?

Offline

#5 2018-09-03 11:28:47

progandy
Member
Registered: 2012-05-17
Posts: 5,322

Re: LC_ALL=C is set, no idea why

I think you set LC_ALL somewhere in your /home, not /usr. I guess .bashrc, .zshrc, .profile or a similar shell rc file.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#6 2018-09-03 11:48:59

Tim.Hilt
Member
Registered: 2018-06-16
Posts: 16

Re: LC_ALL=C is set, no idea why

progandy wrote:

I think you set LC_ALL somewhere in your /home, not /usr. I guess .bashrc, .zshrc, .profile or a similar shell rc file.

[tim@x1carbon: ~]$ grep -rnw '/home/' -e 'LC_.*=C'
/home/tim/.bashrc:18:export LC_ALL=C

Why. On. Earth.

Offline

#7 2018-09-03 12:18:30

Tim.Hilt
Member
Registered: 2018-06-16
Posts: 16

Re: LC_ALL=C is set, no idea why

Ok so after i deleted that line from my .bashrc, running locale gave en_DE.UTF-8 for most of the locales which was even more confusing to me. I use KDE as my Desktop, so i looked in "System Settings > Regional Settings > Language" and "[...] > Formats" And found some en_DE - settings, that i corrected with the de_DE alternative. After a reboot, everything is working fine now! Thanks to everybody who helped me out, especially to @progandy.

Last edited by Tim.Hilt (2018-09-03 12:19:02)

Offline

#8 2018-09-03 12:40:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: LC_ALL=C is set, no idea why

Glad to hear, please mark as [SOLVED] by editing the title in your initial post: https://wiki.archlinux.org/index.php/Co … ow_to_post

Offline

Board footer

Powered by FluxBB