3

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.

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.

2 Answers 2

2

So after opening a thread in the Archlinux-Forum, somebody pointed out, that i might be setting LC_ALL=C somewhere in a file in my Home-Directory. After running grep -rnw '/home/' -e 'LC_.*=C' I found, that in my .bashrc, there was a line saying

export LC_ALL=C

which i deleted. After a reboot, running locale gave me en_DE.UTF-8 for most of my locales, which is even more confusing. But after i looked in my regional settings (Using KDE as my Desktop), i found out that my "Format" Settings were set to en_DE. Deleted that as well, rebooted, now everything works as expected.

1

"Could this be the problem?" – Yes.

Most applications take the encoding from LC_ALL, LC_CTYPE or LANG, the first which is nonempty in this list. The resolved value is also shown by locale charmap. As far as I understand, you have LC_CTYPE=C, not sure about your LC_ALL. These should contain an UTF-8 locale rather than C.

"How come, the locales on my old system are set" – The question should rather be: How come they're not set on your new system? Unfortunately I cannot answer this, but they should be set.

1
  • Thanks, that has guided me in the right direction i think. See edit to original question
    – Tim Hilt
    Sep 3, 2018 at 9:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .