EDIT [FIXED?]: Somehow fixed this issue right after the post. Aside from having re-edited /etc/locale.conf
to assign en_US.UTF-8
on everything followed by sudo locale-gen
, On /etc/profile
I uncommented the manual export at the bottom that I’m not sure was always there. Upon restart all the programs were working again. I suppose this thread would be closed.
#manually export with system profile
export LANG=en_US.UTF-8
Initially when I setup EndeavourOS on my PC (specs here), I chose some settings to be Filipino that related to date and time, but the rest would be in English. But later on, I wanted to change it to also show English for date and time, but my attempts to change it have resulted in failure at first, and when I did manage to change it it was at the expense of breaking programs such as:
MKVToolnix
> terminate called after throwing an instance of 'std::runtime_error'
> what(): locale::facet::_S_create_c_locale name not valid
> Aborted (core dumped)
Perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_ADDRESS = "en_US",
LC_NAME = "en_US",
LC_MONETARY = "en_US",
LC_PAPER = "en_US",
LC_IDENTIFICATION = "en_US",
LC_TELEPHONE = "en_US",
LC_MEASUREMENT = "en_US",
LC_CTYPE = "en_US.UTF-8",
LC_TIME = "en_US",
LC_NUMERIC = "en_US",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Now some of the details are hazy, as I didn’t thoroughly document the order of the steps that I followed, so I’m trying to recall only from memory (which will affect if I can troubleshoot this at all). IIRC I followed the Arch Linux article first by using the steps on 2.1 and then 2.3. This did not have an effect on the immediate session on login. I retried steps on 2.1 again, logged out, and back in. No changes. I retried yet again, restarted, and no changes have occurred still.
From here, I admit to likely having made a mistake, when I used the steps on section 1, I did not check locale -a
at first but instead went straight to editing /etc/locale.gen. The values at the bottom of this file were:
en_US.UTF-8 UTF-8
fil_PH UTF-8
As such I removed fil_PH, but I also uncommented the other en_US.UTF-8 that was existing, so the en_US setting got a duplicate by the time I ran locale-gen
and as such when I did it, I had to re-do it again. I tried both using steps on 2.3 again as well as logout and logging back in. Still no change.
I tried to look for resources from Google and ended up trying to change /etc/locale.conf
to:
LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
And then re-running locale-gen
, then restarted. This actually did change the time and date to show English now for me, but now some programs were not working with errors from the above shown (or not loading anything or even displaying errors like Aegisub or the default Terminal, notably XFCE Terminal works though). I retried some suggestions online such as:
- editing
/etc/locale.conf
to just use en_US for everything that wasn’t LANG, runninglocale-gen
after and using Section 2.1 and 2.3 (as well as restarting) - Using only Section 2.1
localectl set-locale LANG=en_US.UTF-8
and setting the rest of the variables in section 3 - adding
export LC_ALL=C
on the XFCE Terminal (which does allow me to run such programs but this isn’t an ideal solution) - added
export LANG=en_US.UTF-8
on ~/.bash_profile
I acknowledge likely having made a mistake on using LC_ALL or the duplication and it was a mess from here. Of note is at one point I do remember running the steps in section 2.3 and got an error with LC_NUMERIC and LC_TIME that I can only vaguely remember now as being invalid despite being also set to en_US, but can’t replicate that error currently.
I removed the manual export LANG on ~/.bash_profile
, and couldn’t find any traces of locale being overridden on ~/.bashrc
that would break programs. glibc was clearly installed, and reinstalling it (as well as updating the system) does not make any changes.
At this point I frankly just want to reinstall the OS, but I want to know if something basic is amiss that I didn’t account for here.