locale.gen(5)

NAME
locale.gen — configuration file for locale-gen

DESCRIPTION
The locale-gen(8) utility compiles the locales specified by the /etc/locale.gen file and integrates them into a locale archive.

The file is comprised of zero or more lines containing one or two fields separated by one or more <blank> characters. The first field defines the localename. The second field defines the charmap, also known as a character set or codeset. The <slash> character is forbidden within both fields. If only one field is specified, the charmap value shall be taken as "UTF-8".

Empty lines and lines beginning with zero or more <blank> characters followed by a <number-sign> character shall be ignored.

A <number-sign> character surrounded by <blank> characters may appear after the second field and shall also be ignored, along with the remainder of the line.

The definition of a <blank> character is that it is either the <tab> or <space> character.

Consult the provided /usr/share/i18n/SUPPORTED file for all valid combinations of the localename field and charmap field.

LOCALE NAMES
A valid localename is of the following format:

        language[_territory][.charmap][@modifier]

The complete list of supported language[_territory][@modifier] values can be obtained by reading the first column of the /usr/share/i18n/SUPPORTED file. The values map directly to the names of files within the /usr/share/i18n/locales directory.

CHARACTER MAPS
A charmap represents a mapping of character symbols and collating element symbols to actual character encodings that enables a standard way to decode, process, and encode text.

The complete list of supported charmap values can be obtained by reading the second column of the /usr/share/i18n/SUPPORTED file. The values map directly to the names of files within the /usr/share/i18n/charmaps directory.

EXAMPLES
    # These three declarations are considered identical.
    en_US.UTF-8 UTF-8 # trailing comments are allowed
    en_US       UTF-8 # redundant charmap omitted
    en_US             # charmap taken as UTF-8

    # Other charmaps may be specified (not recommended).
    en_US       ISO-8859-1

    # This localename/charmap combination is invalid.
    en_US       GB2312

FILES

/etc/locale.gen
    The default location of the configuration file.

/usr/share/i18n/SUPPORTED
    A list of supported localename and charmap combinations.

/usr/share/i18n/locales
    Contains locale definition files that serve as inputs to localedef(1).

/usr/share/i18n/charmaps
    Contains character map files that serve as inputs to localedef(1).

SEE ALSO
locale-gen(8), localectl(1), locale(1), localedef(1)

STANDARDS
System Interface Definitions, Issue 4, Version 2 (XBD) (1994)
https://pubs.opengroup.org/onlinepubs/009656599/toc.pdf

XPG3-XPG4 Base Migration Guide, Version 2 (1995).
https://archive.opengroup.org/publications/archive/CDROM/g501.pdf

The Open Group Standard Base Specifications, Issue 8 (POSIX-1.2024).
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html

AUTHORS
Kerin Millar (kfm@plushkava.net)
Mike Frysinger (vapier@google.com)
Alastair McKinstry (mckinstry@computer.org)