On Tue, May 18, 2021 at 09:25:30AM -0500, Tom Browder wrote:
> I show the LANG env var set to 'en-US.UTF-8'. When I execute 'locale' I get:
> 
>     LANG=en-US.UTF-8
>     LANGUAGE=
>     LC_CTYPE="C"
>     # all intermediate keys: LC_X="C"
>     LC_ALL=C

Somewhere, you have placed LC_ALL=C in your environment.  You'll need to
track that down and get rid of it.

Overriding specific variables like LC_TIME or LC_COLLATE is fine, but
you should not be setting LC_ALL on a permanent basis.  It's for short-term
emergency overrides only.

LC_ALL is overriding your LANG variable, giving you the results that you
see, and don't want.  For now, you could unset it, and that would fix the
problem in this one terminal.  But you'll need to figure out where it came
from in order to fix it permanently.

If you use bash as a login shell, one of the ways you can track down where
a variable comes from in your interactive shell is:

PS4='+ $BASH_SOURCE:$FUNCNAME:$LINENO:' bash -ilxc : 2>&1 | grep LC_ALL

This only works if it's coming from a file that's sourced by the shell,
not if it's coming from PAM, or from GNOME, or any other desktop
environment.

(And it assumes your dot file configuration is relatively sane; if for
example you failed to source .bashrc from your .profile or .bash_profile,
then you might need to repeat it with -ixc instead of -ilxc to pick up
the lines from .bashrc as well.  But if you did things correctly, this
shouldn't be needed.)

Reply via email to