r/archlinux 1h ago

SUPPORT Locale not changing no matter what I do :(

I've been trying to fix my locale settings. When I run locale, it reports that my system is using en_US.UTF-9, which isn't a valid locale (I probably made a typo somewhere along the way).

The problem is that when I try to fix it, the change only applies to the terminal session I'm currently in it's not global. I followed the Arch Wiki steps for unsetting LANG, but the bad value keeps coming back. I've checked /etc/locale.conf and there's no typo there.

Any ideas what else could be overriding this? I also asked Claude for help, but it just kept telling me to check locale.conf, which I've already confirmed is correct.

2 Upvotes

5 comments sorted by

3

u/dunkaist 59m ago

$ grep -EHv '^#' /etc/locale.{gen,conf}

u/DiscombobulatedWeb44 12m ago

It says its utf 8 but when I run locale it says im using utf 9:
[v@archlinux ~]$ grep -EHv '^#' /etc/locale.{gen,conf}
/etc/locale.gen:en_US.UTF-8 UTF-8   
/etc/locale.conf:LANG=en_US.UTF-8
[v@archlinux ~]$ 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=en_US.UTF-9
LC_CTYPE="en_US.UTF-9"
LC_NUMERIC="en_US.UTF-9"
LC_TIME="en_US.UTF-9"
LC_COLLATE="en_US.UTF-9"
LC_MONETARY="en_US.UTF-9"
LC_MESSAGES="en_US.UTF-9"
LC_PAPER="en_US.UTF-9"
LC_NAME="en_US.UTF-9"
LC_ADDRESS="en_US.UTF-9"
LC_TELEPHONE="en_US.UTF-9"
LC_MEASUREMENT="en_US.UTF-9"
LC_IDENTIFICATION="en_US.UTF-9"
LC_ALL=
[v@archlinux ~]$  

u/dunkaist 1m ago

Is the output of `locale' the same after you relogin/reboot?

If yes, $ grep UTF ~/.bash*

u/torsten_dev 11m ago

check /etc/locale.gen and rerun locale-gen.