≡ Menu

Quickly find out supportable character sets, currency and numeric formats in Linux

A quick way to get locale-specific information is use locale command. The locale program writes information about the current locale environment such as:

=> Character classification and case conversion.

=> Date and time formats.

=> Numeric formats

=> Currency symbols

=> Measurement units and much more

When invoked without arguments, locale summarizes the current locale environment for each locale category defined by the LC_* environment variables.
$ locale
Output:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="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"
LC_ALL=

You can print the coded character sets known using following command:
$ iconv --list

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

{ 0 comments… add one }

Leave a Comment