HP-UX Reference (11i v3 07/02) - 4 File Formats (vol 8)
c
charmap(4) charmap(4)
The encoding is a character constant in one of four forms:
decimal An escape character followed by the letter
d, followed by one to three decimal digits.
octal An escape character followed by one to three octal digits.
hexadecimal An escape character followed by an
x, followed by two hexadecimal digits.
Unicode An escape character followed by a
u
, followed by four or five hexadecimal digits. This
encoding form can only be used when the
-u option of the localedef command is
specified.
Multibyte characters are represented by the concatenation of character constants. All constants used in the
encoding of a multibyte character must be of the same form.
The second form defines a range of characters consisting of all characters from the first symbolic name to
the second, inclusive:
<symbolic_name
>... <symbolic_name
> encoding
The symbolic name must consist of one or more nonnumeric characters followed by an integer formed of
one or more decimal digits. The integer part of the second symbolic name must be larger than that of the
first. The range is then interpreted as a list of symbolic names consisting of the same character portion and
successive integer values from the first through the last. These names are assigned successive encodings
starting with the one given.
For example, the character definition line
<C4>...<C6> \d129
is equivalent to:
<C4> \d129
<C5> \d130
<C6> \d131
Width Specification
The following declarations can follow the character set mapping definitions (after the END CHARMAP
statement). Each consists of one of the keywords shown in the following list, starting in column 1, followed
by the value(s) associated with the keyword, as defined below.
WIDTH A positive integer value (either 1 or 2) defining the column width for the printable
character in the coded character set mapping definitions. Coded character set charac-
ter values are defined using symbolic character names followed by column width
values. Defining a character with more than one WIDTH produces undefined results.
The END WIDTH keyword is used to terminate the WIDTH definitions. Specifying
the width of a non-printable character in a
WIDTH declaration produces undefined
results. Ellipses (...) can be used between two symbolic character names to specify a
range of characters.
WIDTH_DEFAULT
A positive integer value defining the default column width for any printable character
not listed by one of the
WIDTH keywords. If no WIDTH_DEFAULT keyword is
included in the charmap, the default character width is 1.
EXAMPLES
For examples, see any of the files under the /usr/lib/nls/loc/charmaps
directory.
After the
END CHARMAP statement, a syntax for a width definition would be:
WIDTH
<A> 1
<B> 1
<C>...<Z> 1
...
<wc1>...<wcn> 2
END WIDTH
In this example, the numerical code point values represented by the symbols <A> and <B> are assigned a
width of 1. The code point values <C> to <Z> inclusive, that is, <C>, <D>, <E>, and so on, are also
assigned a width of 1. Using <A>...<Z> would have required fewer lines, but the alternative was shown to
HP-UX 11i Version 3: February 2007 − 2 − Hewlett-Packard Company 55