OpenBSD manual page server

Manual Page Search Parameters

MKLOCALE(1) General Commands Manual MKLOCALE(1)

mklocalemake LC_CTYPE locale files

mklocale [-d] [src-file] language/LC_CTYPE

mklocale [-d] -o language/LC_CTYPE src-file

The mklocale utility reads an LC_CTYPE source file from standard input and produces an LC_CTYPE binary file on standard output suitable for placement in /usr/share/locale/<language>/LC_CTYPE.

The format of src-file 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.

The following options are available:

Turns on debugging messages.
Specify an output file.

Besides the keywords which will be listed below, the following are valid tokens in src-file:

A RUNE may be any of the following:
'x'
The ASCII character x.
'\x'
The ANSI C character \x where \x is one of \a, \b, \f, \n, \r, \t, or \v.
0x[0-9a-z]*
A hexadecimal number representing a rune code.
0[0-7]*
An octal number representing a rune code.
[1-9][0-9]*
A decimal number representing a rune code.
A string enclosed in double quotes (").
Either ‘...’ or ‘-’. Used to indicate ranges.
literal
The follow characters are taken literally:

Used to start a mapping. All are equivalent.
Used to end a mapping. All are equivalent.
Used as a delimiter in mappings.

Key words which should only appear once are:

Followed by a STRING which indicates the encoding mechanism to be used for this locale. The current encodings are:
No translation and the default.
adopted from Plan 9 from Bell Labs.
encoding as used by several vendors of UNIX systems.
This keyword must be followed by one or more tab or space characters, after which encoding specific data is placed. Currently only the EUC encoding requires variable data.
A single RUNE follows and is used as the invalid rune for this locale.

The following keywords may appear multiple times and have the following format for data:

RUNE1 RUNE2
is mapped to RUNE2.
RUNE1 THRU RUNEn: RUNE2
Runes RUNE1 through RUNEn are mapped to RUNE2 through RUNE2
Defines the tolower mappings. RUNE2 is the lower case representation of RUNE1.
Defines the toupper mappings. RUNE2 is the upper case representation of RUNE1.
Defines a map from runes to their digit value. RUNE2 is the integer value represented by RUNE1. For example, the ASCII character ‘0’ would map to the decimal value 0. On OpenBSD, this information is ignored and not put into the binary output file.

The following keywords may appear multiple times and have the following format for data:

This rune has the property defined by the keyword.
RUNE1 THRU RUNEn
All the runes between and including RUNE1 and RUNEn have the property defined by the keyword.
Defines runes which are alphabetic, printable, and graphic.
Defines runes which are control characters.
Defines runes which are decimal digits, printable, and graphic.
Defines runes which are graphic and printable.
Defines runes which are lower case, printable, and graphic.
Defines runes which are punctuation, printable, and graphic.
Defines runes which are spaces.
Defines runes which are upper case, printable, and graphic.
Defines runes which are hexadecimal digits, printable, and graphic.
Defines runes which are blank.
Defines runes which are printable.
Defines runes which are ideograms, printable, and graphic.
Defines runes which are special characters, printable, and graphic.
Defines runes which are phonograms, printable, and graphic.
Defines runes with specific glyph width. n takes 0 to 3.
Controls character set for subsequent runes.

setlocale(3)

The mklocale utility first appeared in 4.4BSD.

The mklocale utility is overly simplistic.

We should switch to localedef and its file format, which is more standard.

May 29, 2016 OpenBSD-current