Commit | Line | Data |
---|---|---|
ad787160 C |
1 | .\" Copyright (c) 1993 |
2 | .\" The Regents of the University of California. All rights reserved. | |
8a7debe3 KB |
3 | .\" |
4 | .\" This code is derived from software contributed to Berkeley by | |
5 | .\" Paul Borman at Krystal Technologies. | |
6 | .\" | |
ad787160 C |
7 | .\" Redistribution and use in source and binary forms, with or without |
8 | .\" modification, are permitted provided that the following conditions | |
9 | .\" are met: | |
10 | .\" 1. Redistributions of source code must retain the above copyright | |
11 | .\" notice, this list of conditions and the following disclaimer. | |
12 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
13 | .\" notice, this list of conditions and the following disclaimer in the | |
14 | .\" documentation and/or other materials provided with the distribution. | |
15 | .\" 3. All advertising materials mentioning features or use of this software | |
16 | .\" must display the following acknowledgement: | |
17 | .\" This product includes software developed by the University of | |
18 | .\" California, Berkeley and its contributors. | |
19 | .\" 4. Neither the name of the University nor the names of its contributors | |
20 | .\" may be used to endorse or promote products derived from this software | |
21 | .\" without specific prior written permission. | |
8a7debe3 | 22 | .\" |
ad787160 C |
23 | .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND |
24 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
25 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
26 | .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
27 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
28 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
29 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
30 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
31 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
32 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
33 | .\" SUCH DAMAGE. | |
8a7debe3 | 34 | .\" |
ad787160 C |
35 | .\" @(#)mklocale.1 8.1 (Berkeley) 6/6/93 |
36 | .\" | |
37 | .Dd "June 6, 1993" | |
8a7debe3 KB |
38 | .Dt MKLOCALE 1 |
39 | .Os | |
40 | .Sh NAME | |
41 | .Nm mklocale | |
42 | .Nd make LC_CTYPE locale files | |
43 | .Sh SYNOPSIS | |
44 | .Nm mklocale | |
45 | .Ar "< src-file" | |
46 | .Ar "> language/LC_CTYPE" | |
47 | .Sh DESCRIPTION | |
48 | The | |
49 | .Nm mklocale | |
50 | utility reads a | |
51 | .Dv LC_CTYPE | |
52 | source file from standard input and produces a | |
53 | .Dv LC_CTYPE | |
54 | binary file on standard output suitable for placement in | |
55 | .Dv /usr/share/locale/\fIlanguage\fP/LC_CTYPE. | |
56 | .Pp | |
57 | The format of | |
58 | .Ar src-file | |
59 | is quite simple. | |
60 | It consists of a series of lines which start with a keyword and have | |
61 | associated data following. C style comments are used | |
62 | to place comments in the file. | |
63 | .Pp | |
64 | Besides the keywords which will be listed below, | |
65 | the following are valid tokens in | |
66 | .Ar src-file : | |
67 | .Bl -tag -width literal | |
68 | .It Dv RUNE | |
69 | A | |
70 | .Dv RUNE | |
71 | may be any of the following: | |
72 | .Bl -tag -width 0x[0-9a-z]* | |
73 | .It Ar 'x' | |
74 | The ascii character | |
75 | .Ar x . | |
76 | .It Ar '\ex' | |
77 | The ANSI C character | |
78 | .Ar \ex | |
79 | where | |
80 | .Ar \ex | |
81 | is one of | |
82 | .Dv \ea , | |
83 | .Dv \eb , | |
84 | .Dv \ef , | |
85 | .Dv \en , | |
86 | .Dv \er , | |
87 | .Dv \et , | |
88 | or | |
89 | .Dv \ev . | |
90 | .It Ar 0x[0-9a-z]* | |
91 | A hexadecimal number representing a rune code. | |
92 | .It Ar 0[0-7]* | |
93 | An octal number representing a rune code. | |
94 | .It Ar [1-9][0-9]* | |
95 | A decimal number representing a rune code. | |
96 | .El | |
97 | .It Dv STRING | |
98 | A string enclosed in double quotes ("). | |
99 | .It Dv THRU | |
100 | Either | |
101 | .Dv ... | |
102 | or | |
103 | .Dv - . | |
104 | Used to indicate ranges. | |
105 | .It Ar literal | |
106 | The follow characters are taken literally: | |
107 | .Bl -tag -width "<\|\|(\|\|[" | |
108 | .It Dv "<\|(\|[" | |
109 | Used to start a mapping. All are equivalent. | |
110 | .It Dv ">\|\^)\|]" | |
111 | Used to end a mapping. All are equivalent. | |
112 | .It Dv : | |
113 | Used as a delimiter in mappings. | |
114 | .El | |
115 | .El | |
116 | .sp | |
117 | Key words which should only appear once are: | |
118 | .Bl -tag -width PHONOGRAM | |
119 | .It Dv ENCODING | |
120 | Followed by a | |
121 | .Dv STRING | |
122 | which indicates the encoding mechanism to be used for this locale. | |
123 | The current encodings are: | |
124 | .Bl -tag -width NONE | |
125 | .It Dv NONE | |
126 | No translation and the default. | |
127 | .It Dv UTF2 | |
128 | .Dv "Universal character set Transformation Format" | |
129 | adopted from | |
130 | .Nm "Plan 9 from Bell Labs" . | |
131 | This is the preferred encoding. | |
132 | .It Dv EUC | |
133 | .Dv EUC | |
134 | encoding as used by several | |
135 | vendors of | |
136 | .Ux | |
137 | systems. | |
138 | .El | |
139 | .It Dv VARIABLE | |
140 | This keyword must be followed by a single tab or space character, | |
141 | after which encoding specific data is placed. | |
142 | Currently only the | |
143 | .Dv "EUC" | |
144 | encoding requires variable data. | |
145 | See | |
146 | .Xr euc 4 | |
147 | for further details. | |
148 | .It Dv INVALID | |
149 | A single | |
150 | .Dv RUNE | |
151 | follows and is used as the invalid rune for this locale. | |
152 | .El | |
153 | .sp | |
154 | The following keywords may appear multiple times and have the following | |
155 | format for data: | |
156 | .in +.5i | |
157 | .Bl -tag -width "<RUNE1 THRU RUNEn : RUNE2>" | |
158 | .It Dv <RUNE1 RUNE2> | |
159 | .Dv RUNE1 | |
160 | is mapped to | |
161 | .Dv RUNE2 . | |
162 | .It Dv <RUNE1 THRU RUNEn : RUNE2> | |
163 | Runes | |
164 | .Dv RUNE1 | |
165 | through | |
166 | .Dv RUNEn | |
167 | are mapped to | |
168 | .Dv RUNE2 | |
169 | through | |
170 | .Dv RUNE2 | |
171 | + n-1. | |
172 | .El | |
173 | .in -.5i | |
174 | .Bl -tag -width PHONOGRAM | |
175 | .It Dv MAPLOWER | |
176 | Defines the tolower mappings. | |
177 | .Dv RUNE2 | |
178 | is the lower case representatin of | |
179 | .Dv RUNE1. | |
180 | .It Dv MAPUPPER | |
181 | Defines the toupper mappings. | |
182 | .Dv RUNE2 | |
183 | is the upper case representatin of | |
184 | .Dv RUNE1. | |
185 | .It Dv TODIGIT | |
186 | Defines a map from runes to their digit value. | |
187 | .Dv RUNE2 | |
188 | is the integer value represented by | |
189 | .Dv RUNE1 . | |
190 | For example, the ascii character | |
191 | .Nm '0' | |
192 | would map to the decimal value | |
193 | .Nm 0 . | |
194 | Only values up to | |
195 | .Nm 255 | |
196 | are allowed. | |
197 | .El | |
198 | .sp | |
199 | The following keywords may appear multiple times and have the following | |
200 | format for data: | |
201 | .in +.5i | |
202 | .Bl -tag -width "RUNE1 THRU RUNEn" | |
203 | .It Dv RUNE | |
204 | This rune has the property defined by the keyword. | |
205 | .It Dv "RUNE1 THRU RUNEn" | |
206 | All the runes between and including | |
207 | .Dv RUNE1 | |
208 | and | |
209 | .Dv RUNEn | |
210 | have the property defined by the keyword. | |
211 | .El | |
212 | .in -.5i | |
213 | .Bl -tag -width PHONOGRAM | |
214 | .It Dv ALPHA | |
215 | Defines runes which are alphabetic, printable and graphic. | |
216 | .It Dv CONTROL | |
217 | Defines runes which are control characters. | |
218 | .It Dv DIGIT | |
219 | Defines runes which are decimal digits, printable and graphic. | |
220 | .It Dv GRAPH | |
221 | Defines runes which are graphic and printable. | |
222 | .It Dv LOWER | |
223 | Defines runes which are lower case, printable and graphic. | |
224 | .It Dv PUNCT | |
225 | Defines runes which are punctuation, printable and graphic. | |
226 | .It Dv SPACE | |
227 | Defines runes which are spaces. | |
228 | .It Dv UPPER | |
229 | Defines runes which are upper case, printable and graphic. | |
230 | .It Dv XDIGIT | |
231 | Defines runes which are hexadecimal digits, printable and graphic. | |
232 | .It Dv BLANK | |
233 | Defines runes which are blank. | |
234 | .It Dv PRINT | |
235 | Defines runes which are printable. | |
236 | .It Dv IDEOGRAM | |
237 | Defines runes which are ideograms, printable and graphic. | |
238 | .It Dv SPECIAL | |
239 | Defines runes which are special characters, printable and graphic. | |
240 | .It Dv PHONOGRAM | |
241 | Defines runes which are phonograms, printable and graphic. | |
242 | .El | |
243 | .Sh SEE ALSO | |
244 | .Xr mbrune 3 , | |
245 | .Xr rune 3 , | |
246 | .Xr setlocale 3 , | |
247 | .Xr euc 4 , | |
248 | .Xr utf2 4 | |
249 | .Sh BUGS | |
250 | The | |
251 | .Nm mklocale | |
252 | utility is overly simplistic. | |
253 | .Sh HISTORY | |
254 | The | |
255 | .Nm mklocale | |
256 | utility first appeared in | |
257 | .Bx 4.4 . |