What does C in LC_ALL=C mean?

I know very well that to override locale settings we can use LC_ALL prepended to the command one wants to run. I also know C uses default locale of a system. But what does C stand for ?

4

2 Answers

C stands for the C programming language. It is a synonym for the POSIX locale.

See

The POSIX locale can be specified by assigning to the appropriate environment variables the values "C" or "POSIX".

2

The only solid hint I could was from some Slackware documentation written by the great Patrick Volkerding. In the file /etc/profile.d/lang.sh he has made the following comment:

# 'C' is the old Slackware (and UNIX) default, which is 127-bit ASCII
# with a charmap setting of ANSI_X3.4-1968. These days, it's better to
# use en_US.UTF-8 or another modern $LANG setting (or at least en_US)
# to support extended character sets.
#export LANG=C

Without giving away what the 'C' actually stands for, but I would guess that 'C' is an alias for this very lowest and safest level of locale.... Not very satisfactory I know :(.

To see this comment for yourself in the Slackware package try the following:

wget
tar -zxvf _etc.tar.gz etc/profile.d/lang.sh.new --strip-components 2

And then open the file lang.sh.new with your favoured text editor...

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like