charmap(5)

๐Ÿ’– charmap(5) โ€” the character set description file, bestie ๐Ÿ’–

okay so real talk, you're looking at the charmap page from the File Formats Manual section of the Linux man-pages, and honestly? it's giving "underrated icon" energy. let's get into it. ๐ŸŽ€


โœจ NAME โœจ

charmap โ€” character set description file ๐Ÿฆ‹


๐ŸŒธ DESCRIPTION ๐ŸŒธ

A character set description, aka a charmap, defines all the available characters and their encodings in a character set. that's it, that's the whole vibe. and localedef(1) can use charmaps to create locale variants for different character sets โ€” so yeah, she's useful. ๐Ÿ’…

๐Ÿงš Syntax ๐Ÿงš

The charmap file starts with a header, and that header may consist of these keywords:

  • <code_set_name> โ€” followed by the name of the character map. name her! ๐Ÿ‘‘
  • <comment_char> โ€” followed by a character that will be used as the comment character for the rest of the file. it defaults to the number sign (#). no cap.
  • <escape_char> โ€” 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> โ€” followed by the maximum number of bytes for a character. the default value is 1.
  • <mb_cur_min> โ€” followed by the minimum number of bytes for a character. this value must be less than or equal to <mb_cur_max>. if it's not specified, it defaults to <mb_cur_max>. ๐Ÿ˜Œ
lowkey important: <mb_cur_min> genuinely has to be <= <mb_cur_max>. that's not a suggestion, bestie.

The character set definition section starts with the keyword CHARMAP in the first column. first column specifically, she's picky like that. ๐Ÿ™ˆ

The following lines may have one of these two forms to define the character set:

  • <character> byte-sequence comment โ€” this form defines exactly one character and its byte sequence, with comment being optional.
  • <character>..<character> byte-sequence comment โ€” this form defines a character range and its byte sequence, with comment being optional.

The character set definition section ends with the string END CHARMAP. periodt. ๐Ÿ’€


The character set definition section may optionally be followed by a section to define widths of characters. optional section, optional queen. ๐Ÿ’œ

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. again โ€” first column. she said what she said. โœจ

The following lines may have one of these two 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. note it's ... here, three dots, not two like the charmap range above. iykyk, don't mix them up ๐Ÿซถ

The width definition section ends with the string END WIDTH. ๐ŸŽ€


๐Ÿ“ FILES ๐Ÿ“

  • /usr/share/i18n/charmaps โ€” the usual default character map path. that's where they live, that's their home, protect them ๐Ÿ 

๐ŸŒˆ STANDARDS ๐ŸŒˆ

POSIX.2. that's the one. โญ


๐Ÿ”ฅ EXAMPLES ๐Ÿ”ฅ

The Euro sign is defined as follows in the UTF-8 charmap:

<U20AC>     /xe2/x82/xac EURO SIGN

look at her. iconic. ๐Ÿ’ถโœจ


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

iconv(1), locale(1), localedef(1), locale(5), charsets(7)


and that's the whole page, bestie!! this one came from Linux man-pages 6.20, dated 2026-02-08 โ€” go off, documentation girlies ๐Ÿ’–๐ŸŽ€๐Ÿฆ‹ slay, read your charmaps responsibly, mwah ๐Ÿ’…

๐Ÿ“ฆ where this page comes from
  • arch rolling: man-pages 6.20-1 ยท BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • ๐Ÿ“œ the page's license: GPL-2.0-or-later
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms