a /usr/share/locale/<language>/LC_CTYPE .
p The format of .Ar source is quite simple. It consists of a series of lines which start with a keyword and have associated data following. C style comments are used to place comments in the file.
p Following options are available: l -tag -width XXX t Fl d Turns on debugging messages. t Fl o Specify output file. t Fl t Generate output in new-style LC_{MONETARY,NUMERIC,TIME,MESSAGES} locale-db format. .El
p Besides the keywords which will be listed below, the following are valid tokens in .Ar source : l -tag -width literal t Dv RUNE A .Dv RUNE may be any of the following: l -tag -width 0x[0-9a-f]+ t Ar 'x' The ASCII character .Ar x . t Ar '\ex' The ANSI C character .Ar \ex where .Ar \ex is one of .Dv \ea , .Dv \eb , .Dv \ef , .Dv \en , .Dv \er , .Dv \et , or .Dv \ev . t Ar 0x[0-9a-f]+ A hexadecimal number representing a rune code. t Ar 0[0-7]* An octal number representing a rune code. t Ar [1-9][0-9]* A decimal number representing a rune code. .El t Dv STRING A string enclosed in double quotes ("). t Dv THRU Either .Dv ... or .Dv - . Used to indicate ranges. t Ar literal The follow characters are taken literally: l -tag -width "<\|\|(\|\|[" t Dv "<\|(\|[" Used to start a mapping. All are equivalent. t Dv ">\|\^)\|]" Used to end a mapping. All are equivalent. t Dv : Used as a delimiter in mappings. .El .El
p
Key words which should only appear once are:
l -tag -width PHONOGRAM t Dv ENCODING Followed by a
.Dv STRING
which indicates the encoding mechanism to be used for this locale.
The current encodings are:
l -tag -width NONE t Dv NONE No translation and the default.
t Dv UTF2 .Dv "Universal character set Transformation Format"
adopted from
.Nm "Plan 9 from Bell Labs" .
t Dv EUC .Dv EUC
encoding as used by several
vendors of
x systems.
.El
t Dv VARIABLE This keyword must be followed by a single tab or space character,
after which encoding specific data is placed.
Currently only the
.Dv "EUC"
encoding requires variable data.
See
.Xr euc 4
for further details.
t Dv INVALID A single
.Dv RUNE
follows and is used as the invalid rune for this locale.
.El
p The following keywords may appear multiple times and have the following format for data: l -tag -width "XXRUNE1 THRU RUNEn : RUNE2XX" -offset indent t Aq Dv RUNE1 RUNE2 .Dv RUNE1 is mapped to .Dv RUNE2 . t Aq Dv RUNE1 THRU RUNEn : RUNE2 Runes .Dv RUNE1 through .Dv RUNEn are mapped to .Dv RUNE2 through .Dv RUNE2 + n-1. .El l -tag -width PHONOGRAM t Dv MAPLOWER Defines the tolower mappings. .Dv RUNE2 is the lower case representation of .Dv RUNE1 . t Dv MAPUPPER Defines the toupper mappings. .Dv RUNE2 is the upper case representation of .Dv RUNE1 . t Dv TODIGIT Defines a map from runes to their digit value. .Dv RUNE2 is the integer value represented by .Dv RUNE1 . For example, the ASCII character .Sq 0 would map to the decimal value 0. On .Nx , this information has never been used until now. Only values up to 255 are allowed, and mapping to 256 and above is silently ignored. .El
p
The following keywords may appear multiple times and have the following
format for data:
l -tag -width "RUNE1 THRU RUNEn" t Dv RUNE This rune has the property defined by the keyword.
t Dv "RUNE1 THRU RUNEn" All the runes between and including
.Dv RUNE1
and
.Dv RUNEn
have the property defined by the keyword.
.El
l -tag -width PHONOGRAM t Dv ALPHA Defines runes which are alphabetic, printable, and graphic.
t Dv CONTROL Defines runes which are control characters.
t Dv DIGIT Defines runes which are decimal digits, printable, and graphic.
t Dv GRAPH Defines runes which are graphic and printable.
t Dv LOWER Defines runes which are lower case, printable, and graphic.
t Dv PUNCT Defines runes which are punctuation, printable, and graphic.
t Dv SPACE Defines runes which are spaces.
t Dv UPPER Defines runes which are upper case, printable, and graphic.
t Dv XDIGIT Defines runes which are hexadecimal digits, printable, and graphic.
t Dv BLANK Defines runes which are blank.
t Dv PRINT Defines runes which are printable.
t Dv IDEOGRAM Defines runes which are ideograms, printable, and graphic.
t Dv SPECIAL Defines runes which are special characters, printable, and graphic.
t Dv PHONOGRAM Defines runes which are phonograms, printable, and graphic.
t Dv SWIDTHn Defines runes with specific glyph width.
.Ar n
takes 0 to 3.
t Dv CHARSET Controls character set for subsequent runes.
To support
.Xr iso2022 4
locale definitions.
.El
.Sh SEE ALSO
Xr colldef 1 ,
.Xr setlocale 3 ,
.Xr euc 4 ,
.Xr utf8 4
.Xr nls 7
.Sh HISTORY
The
.Nm mklocale
utility first appeared in
x 4.4 . .Sh BUGS
The
.Nm mklocale
utility is overly simplistic.
p We should switch to .Nm localedef and its file format, which is more standard.