charmap — character symbols to define character encodings


A character set description (charmap) defines a character set of available characters and their encodings. All supported character sets should have the portable character set as a proper subset.


The charmap file starts with a header, that may consist of the following keywords:


is followed by the name of the codeset.


is followed by the max number of bytes for a multibyte-character. Multibyte characters are currently not supported. The default value is 1.


is followed by the min number of bytes for a character. This value must be less or equal than mb_cur_max. If not specified, it defaults to mb_cur_max.


is followed by a character that should be used as the escape-character for the rest of the file to mark characters that should be interpreted in a special way. It defaults to the backslash ( \ ).


is followed by a character that will be used as the comment-character for the rest of the file. It defaults to the number sign ( # ).

The charmap-definition itself starts with the keyword CHARMAP in column 1.

The following lines may have one of the two following forms to define the character-encodings:

<symbolic-name> <encoding> <comments>

This form defines exactly one character and its encoding.

<symbolic-name>...<symbolic-name> <encoding> <comments>

This form defines a couple of characters. This is useful only for multibyte-characters, which are currently not implemented.

The last line in a charmap-definition file must contain END CHARMAP.

Symbolic names

A symbolic name for a character contains only characters of the portable character set. The name itself is enclosed between angle brackets. Characters following an <escape_char> are interpreted as itself; for example, the sequence <\\\>> represents the symbolic name \> enclosed in angle brackets.

Character encoding

The encoding may be in each of the following three forms:


with a decimal number


with a hexadecimal number


with an octal number.






locale(1), localedef(1), localeconv(3), setlocale(3), locale(5)


This page is part of release 3.52 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at−pages/.

  This file is part of locale(1) which displays the settings of the
current locale.
Copyright (C) 1994  Jochen Hein (

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public
License along with this manual; if not, see