Commit | Line | Data |
---|---|---|
5de36ee4 KB |
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 | .\" | |
7 | .\" %sccs.include.redist.roff% | |
8 | .\" | |
5de36ee4 | 9 | .\" @(#)mklocale.1 8.1 (Berkeley) %G% |
8a7debe3 KB |
10 | .\" |
11 | .Dd "" | |
12 | .Dt MKLOCALE 1 | |
13 | .Os | |
14 | .Sh NAME | |
15 | .Nm mklocale | |
16 | .Nd make LC_CTYPE locale files | |
17 | .Sh SYNOPSIS | |
18 | .Nm mklocale | |
19 | .Ar "< src-file" | |
20 | .Ar "> language/LC_CTYPE" | |
21 | .Sh DESCRIPTION | |
22 | The | |
23 | .Nm mklocale | |
24 | utility reads a | |
25 | .Dv LC_CTYPE | |
26 | source file from standard input and produces a | |
27 | .Dv LC_CTYPE | |
28 | binary file on standard output suitable for placement in | |
29 | .Dv /usr/share/locale/\fIlanguage\fP/LC_CTYPE. | |
30 | .Pp | |
31 | The format of | |
32 | .Ar src-file | |
33 | is quite simple. | |
34 | It consists of a series of lines which start with a keyword and have | |
35 | associated data following. C style comments are used | |
36 | to place comments in the file. | |
37 | .Pp | |
38 | Besides the keywords which will be listed below, | |
39 | the following are valid tokens in | |
40 | .Ar src-file : | |
41 | .Bl -tag -width literal | |
42 | .It Dv RUNE | |
43 | A | |
44 | .Dv RUNE | |
45 | may be any of the following: | |
46 | .Bl -tag -width 0x[0-9a-z]* | |
47 | .It Ar 'x' | |
48 | The ascii character | |
49 | .Ar x . | |
50 | .It Ar '\ex' | |
51 | The ANSI C character | |
52 | .Ar \ex | |
53 | where | |
54 | .Ar \ex | |
55 | is one of | |
56 | .Dv \ea , | |
57 | .Dv \eb , | |
58 | .Dv \ef , | |
59 | .Dv \en , | |
60 | .Dv \er , | |
61 | .Dv \et , | |
62 | or | |
63 | .Dv \ev . | |
64 | .It Ar 0x[0-9a-z]* | |
65 | A hexadecimal number representing a rune code. | |
66 | .It Ar 0[0-7]* | |
67 | An octal number representing a rune code. | |
68 | .It Ar [1-9][0-9]* | |
69 | A decimal number representing a rune code. | |
70 | .El | |
71 | .It Dv STRING | |
72 | A string enclosed in double quotes ("). | |
73 | .It Dv THRU | |
74 | Either | |
75 | .Dv ... | |
76 | or | |
77 | .Dv - . | |
78 | Used to indicate ranges. | |
79 | .It Ar literal | |
80 | The follow characters are taken literally: | |
81 | .Bl -tag -width "<\|\|(\|\|[" | |
82 | .It Dv "<\|(\|[" | |
83 | Used to start a mapping. All are equivalent. | |
84 | .It Dv ">\|\^)\|]" | |
85 | Used to end a mapping. All are equivalent. | |
86 | .It Dv : | |
87 | Used as a delimiter in mappings. | |
88 | .El | |
89 | .El | |
90 | .sp | |
91 | Key words which should only appear once are: | |
92 | .Bl -tag -width PHONOGRAM | |
93 | .It Dv ENCODING | |
94 | Followed by a | |
95 | .Dv STRING | |
96 | which indicates the encoding mechanism to be used for this locale. | |
97 | The current encodings are: | |
98 | .Bl -tag -width NONE | |
99 | .It Dv NONE | |
100 | No translation and the default. | |
101 | .It Dv UTF2 | |
102 | .Dv "Universal character set Transformation Format" | |
103 | adopted from | |
104 | .Nm "Plan 9 from Bell Labs" . | |
105 | This is the preferred encoding. | |
106 | .It Dv EUC | |
107 | .Dv EUC | |
108 | encoding as used by several | |
109 | vendors of | |
110 | .Ux | |
111 | systems. | |
112 | .El | |
113 | .It Dv VARIABLE | |
114 | This keyword must be followed by a single tab or space character, | |
115 | after which encoding specific data is placed. | |
116 | Currently only the | |
117 | .Dv "EUC" | |
118 | encoding requires variable data. | |
119 | See | |
120 | .Xr euc 4 | |
121 | for further details. | |
122 | .It Dv INVALID | |
123 | A single | |
124 | .Dv RUNE | |
125 | follows and is used as the invalid rune for this locale. | |
126 | .El | |
127 | .sp | |
128 | The following keywords may appear multiple times and have the following | |
129 | format for data: | |
130 | .in +.5i | |
131 | .Bl -tag -width "<RUNE1 THRU RUNEn : RUNE2>" | |
132 | .It Dv <RUNE1 RUNE2> | |
133 | .Dv RUNE1 | |
134 | is mapped to | |
135 | .Dv RUNE2 . | |
136 | .It Dv <RUNE1 THRU RUNEn : RUNE2> | |
137 | Runes | |
138 | .Dv RUNE1 | |
139 | through | |
140 | .Dv RUNEn | |
141 | are mapped to | |
142 | .Dv RUNE2 | |
143 | through | |
144 | .Dv RUNE2 | |
145 | + n-1. | |
146 | .El | |
147 | .in -.5i | |
148 | .Bl -tag -width PHONOGRAM | |
149 | .It Dv MAPLOWER | |
150 | Defines the tolower mappings. | |
151 | .Dv RUNE2 | |
152 | is the lower case representatin of | |
153 | .Dv RUNE1. | |
154 | .It Dv MAPUPPER | |
155 | Defines the toupper mappings. | |
156 | .Dv RUNE2 | |
157 | is the upper case representatin of | |
158 | .Dv RUNE1. | |
159 | .It Dv TODIGIT | |
160 | Defines a map from runes to their digit value. | |
161 | .Dv RUNE2 | |
162 | is the integer value represented by | |
163 | .Dv RUNE1 . | |
164 | For example, the ascii character | |
165 | .Nm '0' | |
166 | would map to the decimal value | |
167 | .Nm 0 . | |
168 | Only values up to | |
169 | .Nm 255 | |
170 | are allowed. | |
171 | .El | |
172 | .sp | |
173 | The following keywords may appear multiple times and have the following | |
174 | format for data: | |
175 | .in +.5i | |
176 | .Bl -tag -width "RUNE1 THRU RUNEn" | |
177 | .It Dv RUNE | |
178 | This rune has the property defined by the keyword. | |
179 | .It Dv "RUNE1 THRU RUNEn" | |
180 | All the runes between and including | |
181 | .Dv RUNE1 | |
182 | and | |
183 | .Dv RUNEn | |
184 | have the property defined by the keyword. | |
185 | .El | |
186 | .in -.5i | |
187 | .Bl -tag -width PHONOGRAM | |
188 | .It Dv ALPHA | |
189 | Defines runes which are alphabetic, printable and graphic. | |
190 | .It Dv CONTROL | |
191 | Defines runes which are control characters. | |
192 | .It Dv DIGIT | |
193 | Defines runes which are decimal digits, printable and graphic. | |
194 | .It Dv GRAPH | |
195 | Defines runes which are graphic and printable. | |
196 | .It Dv LOWER | |
197 | Defines runes which are lower case, printable and graphic. | |
198 | .It Dv PUNCT | |
199 | Defines runes which are punctuation, printable and graphic. | |
200 | .It Dv SPACE | |
201 | Defines runes which are spaces. | |
202 | .It Dv UPPER | |
203 | Defines runes which are upper case, printable and graphic. | |
204 | .It Dv XDIGIT | |
205 | Defines runes which are hexadecimal digits, printable and graphic. | |
206 | .It Dv BLANK | |
207 | Defines runes which are blank. | |
208 | .It Dv PRINT | |
209 | Defines runes which are printable. | |
210 | .It Dv IDEOGRAM | |
211 | Defines runes which are ideograms, printable and graphic. | |
212 | .It Dv SPECIAL | |
213 | Defines runes which are special characters, printable and graphic. | |
214 | .It Dv PHONOGRAM | |
215 | Defines runes which are phonograms, printable and graphic. | |
216 | .El | |
217 | .Sh SEE ALSO | |
218 | .Xr mbrune 3 , | |
219 | .Xr rune 3 , | |
220 | .Xr setlocale 3 , | |
221 | .Xr euc 4 , | |
222 | .Xr utf2 4 | |
223 | .Sh BUGS | |
224 | The | |
225 | .Nm mklocale | |
226 | utility is overly simplistic. | |
227 | .Sh HISTORY | |
228 | The | |
229 | .Nm mklocale | |
230 | utility first appeared in | |
231 | .Bx 4.4 . |