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