2013-07-15 22:46:47 +04:00
|
|
|
.\" $NetBSD: mklocale.1,v 1.16 2013/07/15 18:46:47 joerg Exp $
|
2001-04-04 15:51:43 +04:00
|
|
|
.\" FreeBSD: src/usr.bin/mklocale/mklocale.1,v 1.6 1999/09/20 09:15:21 phantom Exp
|
2000-12-22 04:31:47 +03: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.
|
2003-08-07 15:13:06 +04:00
|
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
2000-12-22 04:31:47 +03:00
|
|
|
.\" 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
|
|
|
|
.\"
|
2013-07-15 22:46:47 +04:00
|
|
|
.Dd July 15, 2013
|
2000-12-22 04:31:47 +03:00
|
|
|
.Dt MKLOCALE 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mklocale
|
|
|
|
.Nd make LC_CTYPE locale files
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm mklocale
|
|
|
|
.Op Fl d
|
2009-01-02 03:37:40 +03:00
|
|
|
.Op Fl t Ar type
|
2003-05-01 13:45:03 +04:00
|
|
|
\*[Lt]
|
2009-01-02 03:37:40 +03:00
|
|
|
.Ar source
|
2003-05-01 13:45:03 +04:00
|
|
|
\*[Gt]
|
|
|
|
.Ar language/LC_CTYPE
|
2000-12-22 04:31:47 +03:00
|
|
|
.Nm mklocale
|
|
|
|
.Op Fl d
|
2009-01-02 03:37:40 +03:00
|
|
|
.Op Fl t Ar type
|
2000-12-22 04:31:47 +03:00
|
|
|
.Fl o
|
|
|
|
.Ar language/LC_CTYPE
|
2009-01-02 03:37:40 +03:00
|
|
|
.Ar source
|
2000-12-22 04:31:47 +03:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm mklocale
|
2004-01-24 20:03:26 +03:00
|
|
|
utility reads an
|
2000-12-22 04:31:47 +03:00
|
|
|
.Dv LC_CTYPE
|
2004-01-24 20:03:26 +03:00
|
|
|
source file from standard input and produces an
|
2000-12-22 04:31:47 +03:00
|
|
|
.Dv LC_CTYPE
|
|
|
|
binary file on standard output suitable for placement in
|
2003-05-01 13:45:03 +04:00
|
|
|
.Pa /usr/share/locale/\*[Lt]language\*[Gt]/LC_CTYPE .
|
2000-12-22 04:31:47 +03:00
|
|
|
.Pp
|
|
|
|
The format of
|
2009-01-02 03:37:40 +03:00
|
|
|
.Ar source
|
2000-12-22 04:31:47 +03:00
|
|
|
is quite simple.
|
|
|
|
It consists of a series of lines which start with a keyword and have
|
2002-09-30 15:08:56 +04:00
|
|
|
associated data following.
|
|
|
|
C style comments are used
|
2000-12-22 04:31:47 +03:00
|
|
|
to place comments in the file.
|
|
|
|
.Pp
|
|
|
|
Following options are available:
|
2004-01-24 20:03:26 +03:00
|
|
|
.Bl -tag -width XXX
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Fl d
|
2002-12-22 16:50:35 +03:00
|
|
|
Turns on debugging messages.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Fl o
|
|
|
|
Specify output file.
|
2009-01-02 03:37:40 +03:00
|
|
|
.It Fl t
|
|
|
|
Generate output in new-style LC_{MONETARY,NUMERIC,TIME,MESSAGES}
|
|
|
|
locale-db format.
|
2000-12-22 04:31:47 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Besides the keywords which will be listed below,
|
|
|
|
the following are valid tokens in
|
2009-01-02 03:37:40 +03:00
|
|
|
.Ar source :
|
2000-12-22 04:31:47 +03:00
|
|
|
.Bl -tag -width literal
|
|
|
|
.It Dv RUNE
|
|
|
|
A
|
|
|
|
.Dv RUNE
|
|
|
|
may be any of the following:
|
2013-07-15 22:46:47 +04:00
|
|
|
.Bl -tag -width 0x[0-9a-f]+
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Ar 'x'
|
|
|
|
The ASCII character
|
|
|
|
.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 .
|
2013-07-15 22:46:47 +04:00
|
|
|
.It Ar 0x[0-9a-f]+
|
2000-12-22 04:31:47 +03:00
|
|
|
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:
|
2002-02-08 04:36:18 +03:00
|
|
|
.Bl -tag -width "\*[Lt]\|\|(\|\|["
|
|
|
|
.It Dv "\*[Lt]\|(\|["
|
2002-09-30 15:08:56 +04:00
|
|
|
Used to start a mapping.
|
|
|
|
All are equivalent.
|
2002-02-08 04:36:18 +03:00
|
|
|
.It Dv "\*[Gt]\|\^)\|]"
|
2002-09-30 15:08:56 +04:00
|
|
|
Used to end a mapping.
|
|
|
|
All are equivalent.
|
2010-05-14 21:23:13 +04:00
|
|
|
.It Dv \&:
|
2000-12-22 04:31:47 +03:00
|
|
|
Used as a delimiter in mappings.
|
|
|
|
.El
|
|
|
|
.El
|
2003-05-01 13:45:03 +04:00
|
|
|
.Pp
|
2000-12-22 04:31:47 +03: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
|
|
|
|
.Nm "Plan 9 from Bell Labs" .
|
|
|
|
.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-04-04 15:51:43 +04:00
|
|
|
Currently only the
|
2000-12-22 04:31:47 +03:00
|
|
|
.Dv "EUC"
|
|
|
|
encoding requires variable data.
|
2003-05-01 13:45:03 +04:00
|
|
|
.\" See
|
|
|
|
.\" .Xr euc 4
|
|
|
|
.\" for further details.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv INVALID
|
|
|
|
A single
|
|
|
|
.Dv RUNE
|
|
|
|
follows and is used as the invalid rune for this locale.
|
|
|
|
.El
|
2004-01-24 20:03:26 +03:00
|
|
|
.Pp
|
2000-12-22 04:31:47 +03:00
|
|
|
The following keywords may appear multiple times and have the following
|
|
|
|
format for data:
|
2010-05-14 21:23:13 +04:00
|
|
|
.Bl -tag -width "XXRUNE1 THRU RUNEn : RUNE2XX" -offset indent
|
2003-05-01 13:45:03 +04:00
|
|
|
.It Aq Dv RUNE1 RUNE2
|
2000-12-22 04:31:47 +03:00
|
|
|
.Dv RUNE1
|
|
|
|
is mapped to
|
|
|
|
.Dv RUNE2 .
|
2003-05-01 13:45:03 +04:00
|
|
|
.It Aq Dv RUNE1 THRU RUNEn : RUNE2
|
2000-12-22 04:31:47 +03:00
|
|
|
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-04-04 15:51:43 +04:00
|
|
|
.Dv RUNE1 .
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv MAPUPPER
|
|
|
|
Defines the toupper mappings.
|
|
|
|
.Dv RUNE2
|
|
|
|
is the upper case representation of
|
2001-04-04 15:51:43 +04:00
|
|
|
.Dv RUNE1 .
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv TODIGIT
|
|
|
|
Defines a map from runes to their digit value.
|
|
|
|
.Dv RUNE2
|
2004-01-24 20:03:26 +03:00
|
|
|
is the integer value represented by
|
2000-12-22 04:31:47 +03:00
|
|
|
.Dv RUNE1 .
|
|
|
|
For example, the ASCII character
|
2003-05-01 13:45:03 +04:00
|
|
|
.Sq 0
|
|
|
|
would map to the decimal value 0.
|
|
|
|
Only values up to 255 are allowed.
|
2000-12-22 04:31:47 +03:00
|
|
|
.El
|
2004-01-24 20:03:26 +03:00
|
|
|
.Pp
|
2000-12-22 04:31:47 +03:00
|
|
|
The following keywords may appear multiple times and have the following
|
|
|
|
format for data:
|
|
|
|
.Bl -tag -width "RUNE1 THRU RUNEn"
|
|
|
|
.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
|
2003-05-01 13:45:03 +04:00
|
|
|
Defines runes which are alphabetic, printable, and graphic.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv CONTROL
|
|
|
|
Defines runes which are control characters.
|
|
|
|
.It Dv DIGIT
|
2003-05-01 13:45:03 +04:00
|
|
|
Defines runes which are decimal digits, printable, and graphic.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv GRAPH
|
|
|
|
Defines runes which are graphic and printable.
|
|
|
|
.It Dv LOWER
|
2003-05-01 13:45:03 +04:00
|
|
|
Defines runes which are lower case, printable, and graphic.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv PUNCT
|
2003-05-01 13:45:03 +04:00
|
|
|
Defines runes which are punctuation, printable, and graphic.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv SPACE
|
|
|
|
Defines runes which are spaces.
|
|
|
|
.It Dv UPPER
|
2003-05-01 13:45:03 +04:00
|
|
|
Defines runes which are upper case, printable, and graphic.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv XDIGIT
|
2003-05-01 13:45:03 +04:00
|
|
|
Defines runes which are hexadecimal digits, printable, and graphic.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv BLANK
|
|
|
|
Defines runes which are blank.
|
|
|
|
.It Dv PRINT
|
|
|
|
Defines runes which are printable.
|
|
|
|
.It Dv IDEOGRAM
|
2003-05-01 13:45:03 +04:00
|
|
|
Defines runes which are ideograms, printable, and graphic.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv SPECIAL
|
2003-05-01 13:45:03 +04:00
|
|
|
Defines runes which are special characters, printable, and graphic.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv PHONOGRAM
|
2003-05-01 13:45:03 +04:00
|
|
|
Defines runes which are phonograms, printable, and graphic.
|
2000-12-22 04:31:47 +03:00
|
|
|
.It Dv SWIDTHn
|
|
|
|
Defines runes with specific glyph width.
|
|
|
|
.Ar n
|
|
|
|
takes 0 to 3.
|
|
|
|
.It Dv CHARSET
|
|
|
|
Controls character set for subsequent runes.
|
2003-05-01 12:09:57 +04:00
|
|
|
.\" To support
|
|
|
|
.\" .Xr iso2022 4
|
|
|
|
.\" locale definitions.
|
2000-12-22 04:31:47 +03:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
2001-04-04 16:07:04 +04:00
|
|
|
.\"Xr colldef 1 ,
|
2000-12-22 04:31:47 +03:00
|
|
|
.Xr setlocale 3 ,
|
2003-05-01 12:09:57 +04:00
|
|
|
.\" .Xr euc 4 ,
|
|
|
|
.\" .Xr utf8 4
|
|
|
|
.Xr nls 7
|
2001-12-01 23:45:20 +03:00
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm mklocale
|
|
|
|
utility first appeared in
|
|
|
|
.Bx 4.4 .
|
2000-12-22 04:31:47 +03:00
|
|
|
.Sh BUGS
|
|
|
|
The
|
|
|
|
.Nm mklocale
|
|
|
|
utility is overly simplistic.
|
2000-12-24 02:24:25 +03:00
|
|
|
.Pp
|
|
|
|
We should switch to
|
|
|
|
.Nm localedef
|
|
|
|
and its file format, which is more standard.
|