Debian Codegraph @

upstream/debian-unstable/man5/charmap.5

raw
1 .\" Copyright 1994, Jochen Hein <[email protected]>
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\"
6 .TH charmap 5 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 charmap \- character set description file
9 .SH DESCRIPTION
10 A character set description (charmap) defines all available characters
11 and their encodings in a character set.
12 .BR localedef (1)
13 can use charmaps to create locale variants for different character sets.
14 .SS Syntax
15 The charmap file starts with a header that may consist of the
16 following keywords:
17 .TP
18 .RI < code_set_name >
19 is followed by the name of the character map.
20 .TP
21 .RI < comment_char >
22 is followed by a character that will be used as the comment character
23 for the rest of the file.
24 It defaults to the number sign (#).
25 .TP
26 .RI < escape_char >
27 is followed by a character that should be used as the escape character
28 for the rest of the file to mark characters that should be interpreted
29 in a special way.
30 It defaults to the backslash (\[rs]).
31 .TP
32 .RI < mb_cur_max >
33 is followed by the maximum number of bytes for a character.
34 The default value is 1.
35 .TP
36 .RI < mb_cur_min >
37 is followed by the minimum number of bytes for a character.
38 This value must be less than or equal than
39 .RI < mb_cur_max >.
40 If not specified, it defaults to
41 .RI < mb_cur_max >.
42 .P
43 The character set definition section starts with the keyword
44 .I CHARMAP
45 in the first column.
46 .P
47 The following lines may have one of the two following forms to
48 define the character set:
49 .TP
50 .RI < character >\ byte-sequence\ comment
51 This form defines exactly one character and its byte sequence,
52 .I comment
53 being optional.
54 .TP
55 .RI < character >..< character >\ byte-sequence\ comment
56 This form defines a character range and its byte sequence,
57 .I comment
58 being optional.
59 .P
60 The character set definition section ends with the string
61 .IR "END CHARMAP" .
62 .P
63 The character set definition section may optionally be followed by a
64 section to define widths of characters.
65 .P
66 The
67 .I WIDTH_DEFAULT
68 keyword can be used to define the default width for all characters
69 not explicitly listed.
70 The default character width is 1.
71 .P
72 The width section for individual characters starts with the keyword
73 .I WIDTH
74 in the first column.
75 .P
76 The following lines may have one of the two following forms to
77 define the widths of the characters:
78 .TP
79 .RI < character >\ width
80 This form defines the width of exactly one character.
81 .TP
82 .RI < character >...< character >\ width
83 This form defines the width for all the characters in the range.
84 .P
85 The width definition section ends with the string
86 .IR "END WIDTH" .
87 .SH FILES
88 .TP
89 .I /usr/share/i18n/charmaps
90 Usual default character map path.
91 .SH STANDARDS
92 POSIX.2.
93 .SH EXAMPLES
94 The Euro sign is defined as follows in the
95 .I UTF\-8
96 charmap:
97 .P
98 .nf
99 <U20AC> /xe2/x82/xac EURO SIGN
100 .fi
101 .SH SEE ALSO
102 .BR iconv (1),
103 .BR locale (1),
104 .BR localedef (1),
105 .BR locale (5),
106 .BR charsets (7)