1994-05-27 13:33:43 +01:00
|
|
|
.\" Copyright (c) 1993, 1994
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to Berkeley by
|
|
|
|
.\" Paul Borman at Krystal Technologies.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the University of
|
|
|
|
.\" California, Berkeley and its contributors.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" @(#)mklocale.1 8.2 (Berkeley) 4/18/94
|
1999-08-28 02:08:13 +01:00
|
|
|
.\" $FreeBSD$
|
1994-05-27 13:33:43 +01:00
|
|
|
.\"
|
1997-06-23 05:03:49 +01:00
|
|
|
.Dd April 18, 1994
|
1994-05-27 13:33:43 +01:00
|
|
|
.Dt MKLOCALE 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mklocale
|
|
|
|
.Nd make LC_CTYPE locale files
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
1999-12-17 14:34:02 +00:00
|
|
|
.Op Fl d
|
1994-05-27 13:33:43 +01:00
|
|
|
.Ar "< src-file"
|
|
|
|
.Ar "> language/LC_CTYPE"
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
1999-12-17 14:34:02 +00:00
|
|
|
.Op Fl d
|
|
|
|
.Fl o
|
|
|
|
.Ar language/LC_CTYPE
|
|
|
|
.Ar src-file
|
1994-05-27 13:33:43 +01:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
1994-05-27 13:33:43 +01:00
|
|
|
utility reads a
|
|
|
|
.Dv LC_CTYPE
|
|
|
|
source file from standard input and produces a
|
|
|
|
.Dv LC_CTYPE
|
|
|
|
binary file on standard output suitable for placement in
|
2001-02-01 16:38:02 +00:00
|
|
|
.Pa /usr/share/locale/ Ns Ar language Ns Pa /LC_CTYPE .
|
1994-05-27 13:33:43 +01:00
|
|
|
.Pp
|
|
|
|
The format of
|
|
|
|
.Ar src-file
|
|
|
|
is quite simple.
|
|
|
|
It consists of a series of lines which start with a keyword and have
|
|
|
|
associated data following. C style comments are used
|
|
|
|
to place comments in the file.
|
|
|
|
.Pp
|
1999-12-17 14:34:02 +00:00
|
|
|
Following options are available:
|
|
|
|
.Bl -tag -width indent
|
|
|
|
.It Fl d
|
|
|
|
Turns on debuging messages.
|
|
|
|
.It Fl o
|
|
|
|
Specify output file.
|
|
|
|
.El
|
|
|
|
.Pp
|
1994-05-27 13:33:43 +01:00
|
|
|
Besides the keywords which will be listed below,
|
|
|
|
the following are valid tokens in
|
|
|
|
.Ar src-file :
|
|
|
|
.Bl -tag -width literal
|
|
|
|
.It Dv RUNE
|
|
|
|
A
|
|
|
|
.Dv RUNE
|
|
|
|
may be any of the following:
|
|
|
|
.Bl -tag -width 0x[0-9a-z]*
|
|
|
|
.It Ar 'x'
|
1999-09-20 10:15:23 +01:00
|
|
|
The ASCII character
|
1994-05-27 13:33:43 +01:00
|
|
|
.Ar x .
|
|
|
|
.It Ar '\ex'
|
|
|
|
The ANSI C character
|
|
|
|
.Ar \ex
|
|
|
|
where
|
|
|
|
.Ar \ex
|
|
|
|
is one of
|
|
|
|
.Dv \ea ,
|
|
|
|
.Dv \eb ,
|
|
|
|
.Dv \ef ,
|
|
|
|
.Dv \en ,
|
|
|
|
.Dv \er ,
|
|
|
|
.Dv \et ,
|
|
|
|
or
|
|
|
|
.Dv \ev .
|
|
|
|
.It Ar 0x[0-9a-z]*
|
|
|
|
A hexadecimal number representing a rune code.
|
|
|
|
.It Ar 0[0-7]*
|
|
|
|
An octal number representing a rune code.
|
|
|
|
.It Ar [1-9][0-9]*
|
|
|
|
A decimal number representing a rune code.
|
|
|
|
.El
|
|
|
|
.It Dv STRING
|
|
|
|
A string enclosed in double quotes (").
|
|
|
|
.It Dv THRU
|
|
|
|
Either
|
|
|
|
.Dv ...
|
|
|
|
or
|
|
|
|
.Dv - .
|
|
|
|
Used to indicate ranges.
|
|
|
|
.It Ar literal
|
|
|
|
The follow characters are taken literally:
|
|
|
|
.Bl -tag -width "<\|\|(\|\|["
|
|
|
|
.It Dv "<\|(\|["
|
|
|
|
Used to start a mapping. All are equivalent.
|
|
|
|
.It Dv ">\|\^)\|]"
|
|
|
|
Used to end a mapping. All are equivalent.
|
|
|
|
.It Dv :
|
|
|
|
Used as a delimiter in mappings.
|
|
|
|
.El
|
|
|
|
.El
|
2000-11-10 17:46:15 +00:00
|
|
|
.Pp
|
1994-05-27 13:33:43 +01:00
|
|
|
Key words which should only appear once are:
|
|
|
|
.Bl -tag -width PHONOGRAM
|
|
|
|
.It Dv ENCODING
|
|
|
|
Followed by a
|
|
|
|
.Dv STRING
|
|
|
|
which indicates the encoding mechanism to be used for this locale.
|
|
|
|
The current encodings are:
|
|
|
|
.Bl -tag -width NONE
|
|
|
|
.It Dv NONE
|
|
|
|
No translation and the default.
|
|
|
|
.It Dv UTF2
|
|
|
|
.Dv "Universal character set Transformation Format"
|
|
|
|
adopted from
|
2000-11-20 19:21:22 +00:00
|
|
|
.Tn "Plan 9 from Bell Labs" .
|
1994-05-27 13:33:43 +01:00
|
|
|
This is the preferred encoding.
|
|
|
|
.It Dv EUC
|
|
|
|
.Dv EUC
|
|
|
|
encoding as used by several
|
|
|
|
vendors of
|
|
|
|
.Ux
|
|
|
|
systems.
|
|
|
|
.El
|
|
|
|
.It Dv VARIABLE
|
|
|
|
This keyword must be followed by a single tab or space character,
|
|
|
|
after which encoding specific data is placed.
|
2001-07-15 09:06:20 +01:00
|
|
|
Currently only the
|
1994-05-27 13:33:43 +01:00
|
|
|
.Dv "EUC"
|
|
|
|
encoding requires variable data.
|
2001-07-15 09:06:20 +01:00
|
|
|
See
|
1994-05-27 13:33:43 +01:00
|
|
|
.Xr euc 4
|
|
|
|
for further details.
|
|
|
|
.It Dv INVALID
|
|
|
|
A single
|
|
|
|
.Dv RUNE
|
|
|
|
follows and is used as the invalid rune for this locale.
|
|
|
|
.El
|
2000-11-10 17:46:15 +00:00
|
|
|
.Pp
|
1994-05-27 13:33:43 +01:00
|
|
|
The following keywords may appear multiple times and have the following
|
|
|
|
format for data:
|
2000-11-10 17:46:15 +00:00
|
|
|
.Bl -tag -width "<RUNE1 THRU RUNEn : RUNE2>" -offset indent
|
1994-05-27 13:33:43 +01:00
|
|
|
.It Dv <RUNE1 RUNE2>
|
|
|
|
.Dv RUNE1
|
|
|
|
is mapped to
|
|
|
|
.Dv RUNE2 .
|
|
|
|
.It Dv <RUNE1 THRU RUNEn : RUNE2>
|
|
|
|
Runes
|
|
|
|
.Dv RUNE1
|
|
|
|
through
|
|
|
|
.Dv RUNEn
|
|
|
|
are mapped to
|
|
|
|
.Dv RUNE2
|
|
|
|
through
|
|
|
|
.Dv RUNE2
|
|
|
|
+ n-1.
|
|
|
|
.El
|
|
|
|
.Bl -tag -width PHONOGRAM
|
|
|
|
.It Dv MAPLOWER
|
|
|
|
Defines the tolower mappings.
|
|
|
|
.Dv RUNE2
|
|
|
|
is the lower case representation of
|
2001-02-01 16:38:02 +00:00
|
|
|
.Dv RUNE1 .
|
1994-05-27 13:33:43 +01:00
|
|
|
.It Dv MAPUPPER
|
|
|
|
Defines the toupper mappings.
|
|
|
|
.Dv RUNE2
|
|
|
|
is the upper case representation of
|
2001-02-01 16:38:02 +00:00
|
|
|
.Dv RUNE1 .
|
1994-05-27 13:33:43 +01:00
|
|
|
.It Dv TODIGIT
|
|
|
|
Defines a map from runes to their digit value.
|
|
|
|
.Dv RUNE2
|
|
|
|
is the integer value represented by
|
|
|
|
.Dv RUNE1 .
|
1999-09-20 10:15:23 +01:00
|
|
|
For example, the ASCII character
|
2000-11-20 19:21:22 +00:00
|
|
|
.Ql 0
|
|
|
|
would map to the decimal value 0.
|
|
|
|
Only values up to 255
|
1994-05-27 13:33:43 +01:00
|
|
|
are allowed.
|
|
|
|
.El
|
2000-11-10 17:46:15 +00:00
|
|
|
.Pp
|
1994-05-27 13:33:43 +01:00
|
|
|
The following keywords may appear multiple times and have the following
|
|
|
|
format for data:
|
2000-11-10 17:46:15 +00:00
|
|
|
.Bl -tag -width "RUNE1 THRU RUNEn" -offset indent
|
1994-05-27 13:33:43 +01:00
|
|
|
.It Dv RUNE
|
|
|
|
This rune has the property defined by the keyword.
|
|
|
|
.It Dv "RUNE1 THRU RUNEn"
|
|
|
|
All the runes between and including
|
|
|
|
.Dv RUNE1
|
|
|
|
and
|
|
|
|
.Dv RUNEn
|
|
|
|
have the property defined by the keyword.
|
|
|
|
.El
|
|
|
|
.Bl -tag -width PHONOGRAM
|
|
|
|
.It Dv ALPHA
|
|
|
|
Defines runes which are alphabetic, printable and graphic.
|
|
|
|
.It Dv CONTROL
|
|
|
|
Defines runes which are control characters.
|
|
|
|
.It Dv DIGIT
|
|
|
|
Defines runes which are decimal digits, printable and graphic.
|
|
|
|
.It Dv GRAPH
|
|
|
|
Defines runes which are graphic and printable.
|
|
|
|
.It Dv LOWER
|
|
|
|
Defines runes which are lower case, printable and graphic.
|
|
|
|
.It Dv PUNCT
|
|
|
|
Defines runes which are punctuation, printable and graphic.
|
|
|
|
.It Dv SPACE
|
|
|
|
Defines runes which are spaces.
|
|
|
|
.It Dv UPPER
|
|
|
|
Defines runes which are upper case, printable and graphic.
|
|
|
|
.It Dv XDIGIT
|
|
|
|
Defines runes which are hexadecimal digits, printable and graphic.
|
|
|
|
.It Dv BLANK
|
|
|
|
Defines runes which are blank.
|
|
|
|
.It Dv PRINT
|
|
|
|
Defines runes which are printable.
|
|
|
|
.It Dv IDEOGRAM
|
|
|
|
Defines runes which are ideograms, printable and graphic.
|
|
|
|
.It Dv SPECIAL
|
|
|
|
Defines runes which are special characters, printable and graphic.
|
|
|
|
.It Dv PHONOGRAM
|
|
|
|
Defines runes which are phonograms, printable and graphic.
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
1999-12-17 14:34:02 +00:00
|
|
|
.Xr colldef 1 ,
|
1994-05-27 13:33:43 +01:00
|
|
|
.Xr mbrune 3 ,
|
|
|
|
.Xr rune 3 ,
|
|
|
|
.Xr setlocale 3 ,
|
|
|
|
.Xr euc 4 ,
|
|
|
|
.Xr utf2 4
|
|
|
|
.Sh BUGS
|
|
|
|
The
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
1994-05-27 13:33:43 +01:00
|
|
|
utility is overly simplistic.
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
2000-11-20 19:21:22 +00:00
|
|
|
.Nm
|
1994-05-27 13:33:43 +01:00
|
|
|
utility first appeared in
|
|
|
|
.Bx 4.4 .
|