2

It seems like typically:

echo $LANG

results in something like this:

en_US.UTF-8

What encoding is used when the result does not specify an encoding?

echo $LANG
en_US

How do I figure out what the default encoding is?

Using CentOS and Redhat (various versions).

1 Answers1

2

You can use locale.

Current encoding:

locale charmap

All available encoding:

locale -m

Example with my system:

$ locale charmap
UTF-8

$ LC_ALL=C export LC_ALL
$ locale charmap        
ANSI_X3.4-1968
cuonglm
  • 153,898