summaryrefslogtreecommitdiff
path: root/man5/charmap.5
blob: 349fe686ea0477951830c7c02764a8959c1b650c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.\" Hey emacs, this is -*- nroff -*-
.\"
.\" This file is part of locale(1) which displays the settings of the
.\" current locale.
.\" Copyright (C) 1994  Jochen Hein (Hein@Student.TU-Clausthal.de)
.\"
.\" 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
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
.\"
.TH CHARMAP 5 1994-11-28 "" "Linux User Manual"
.SH NAME
charmap \- character symbols to define character encodings
.SH DESCRIPTION
A character set description (charmap) defines a character set of
available characters and their encodings.
All supported character
sets should have the
.B portable character set
as a proper subset.
.\" Not true anymore:
.\" The portable character set is defined in the file
.\" .I /usr/lib/nls/charmap/POSIX
.\" .I /usr/share/i18n/charmap/POSIX
.\" for reference purposes.
.SS Syntax
The charmap file starts with a header, that may consist of the
following keywords:
.TP
.I <codeset>
is followed by the name of the codeset.
.TP
.I <mb_cur_max>
is followed by the max number of bytes for a multibyte-character.
Multibyte characters are currently not supported.
The default value
is 1.
.TP
.I <mb_cur_min>
is followed by the min number of bytes for a character.
This
value must be less or equal than
.BR mb_cur_max .
If not specified, it defaults to
.BR mb_cur_max .
.TP
.I <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 (
.B \\\\
).
.TP
.I <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 (
.B #
).
.PP
The charmap-definition itself starts with the keyword
.B CHARMAP
in column 1.

The following lines may have one of the two following forms to
define the character-encodings:
.TP
.I <symbolic-name> <encoding> <comments>
This form defines exactly one character and its encoding.
.TP
.I <symbolic-name>...<symbolic-name> <encoding> <comments>
This form defines a couple of characters.
This is only useful for
multibyte-characters, which are currently not implemented.
.PP
The last line in a charmap-definition file must contain
.B END CHARMAP.
.SS "Symbolic Names"
A
.B symbolic name
for a character contains only characters of the
.B portable character set.
The name itself is enclosed between angle brackets.
Characters following an
.B <escape_char>
are interpreted as itself; for example, the sequence
.B "<\\\\\\\\\\\\>>"
represents the symbolic name
.B "\\\\>"
enclosed in angle brackets.
.SS "Character Encoding"
The
encoding may be in each of the following three forms:
.TP
.I <escape_char>d<number>
with a decimal number
.TP
.I <escape_char>x<number>
with a hexadecimal number
.TP
.I <escape_char><number>
with an octal number.
.\" FIXME comments
.\" FIXME char ... char
.SH FILES
.I /usr/share/i18n/charmaps/*
.\" .SH AUTHOR
.\" Jochen Hein (jochen.hein@delphi.central.de)
.SH "CONFORMING TO"
POSIX.2.
.SH "SEE ALSO"
.BR locale (1),
.BR localedef (1),
.BR localeconv (3),
.BR setlocale (3),
.BR locale (5)