charmap - character set description file
| Use Case | Command | Description |
|---|---|---|
| Define a single character | <character> <byte-sequence> [comment] | Map a single character to its byte sequence, optional comment |
| Define a character range | <character>..<character> <byte-sequence> [comment] | Map a contiguous range of characters to sequential byte sequences |
| Set comment character | <comment_char> <char> | Set the character used for comments (default #) |
| Set escape character | <escape_char> <char> | Set the escape character for special interpretation (default \) |
| Set maximum bytes per character | <mb_cur_max> <number> | Maximum length of a multi-byte character (default 1) |
| Set minimum bytes per character | <mb_cur_min> <number> | Minimum length, ⤠<mb_cur_max> (defaults to max) |
| Set default character width | WIDTH_DEFAULT <width> | Default width for all characters not explicitly listed (default 1) |
| Define width for a single character | <character> <width> | Width of exactly one character |
| Define width for a character range | <character>...<character> <width> | Width for all characters in the range |
| End character set definition | END CHARMAP | Terminates the CHARMAP section |
| End width definition | END WIDTH | Terminates the WIDTH section |
A character set description (charmap) defines all available characters and their encodings in a character set. localedef(1) can use charmaps to create locale variants for different character sets.
The charmap file starts with a header that may consist of the following keywords:
<code_set_name>
đ is followed by the name of the character map.
<comment_char>
đŦ 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 (#).
<escape_char>
âŠī¸ 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 (\).
<mb_cur_max>
đĸ is followed by the maximum number of bytes for a character. The default value is 1.
<mb_cur_min>
đŊ is followed by the minimum number of bytes for a character. This value must be less than or equal to <mb_cur_max>. If not specified, it defaults to <mb_cur_max>.
đ The character set definition section starts with the keyword CHARMAP in the first column.
đ The following lines may have one of the two following forms to define the character set:
<character> byte-sequence comment
đ¤ This form defines exactly one character and its byte sequence, comment being optional.
<character>..<character> byte-sequence comment
đĸ This form defines a character range and its byte sequence, comment being optional.
đ The character set definition section ends with the string END CHARMAP.
đ The character set definition section may optionally be followed by a section to define widths of characters.
đ The WIDTH_DEFAULT keyword can be used to define the default width for all characters not explicitly listed. The default character width is 1.
đ The width section for individual characters starts with the keyword WIDTH in the first column.
đ The following lines may have one of the two following forms to define the widths of the characters:
<character> width
đ This form defines the width of exactly one character.
<character>...<character> width
đ This form defines the width for all the characters in the range.
đ The width definition section ends with the string END WIDTH.
/usr/share/i18n/charmaps
đ Usual default character map path.
POSIX.2.
đą The Euro sign is defined as follows in the UTF-8 charmap:
<U20AC> /xe2/x82/xac EURO SIGN
iconv(1), locale(1), localedef(1), locale(5), charsets(7)
This page is part of release 5.10 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Generated by phpman v4.9.22-1-g1b0fcb4 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-05 06:04 @216.73.216.52
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-pro / taotoken.net / www.chedong.com - original format