source: trunk/minix/commands/i386/mtools-3.9.7/toupper.c@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 18.9 KB
RevLine 
[9]1#include "codepage.h"
2
3/* MS-DOS doesn't use the same ASCII code as Unix does. The appearance
4 * of the characters is defined using code pages. These code pages
5 * aren't the same for all countries. For instance, some code pages
6 * don't contain upper case accented characters. This affects two
7 * things, relating to filenames:
8
9 * 1. upper case characters. In short names, only upper case
10 * characters are allowed. This also holds for accented characters.
11 * For instance, in a code page which doesn't contain accented
12 * uppercase characters, the accented lowercase characters get
13 * transformed into their unaccented counterparts. This is very bad
14 * design. Indeed, stuff like national language support should never
15 * affect filesystem integrity. And it does: A filename which is legal
16 * in one country could be illegal in another one. Bad News for
17 * frequent travellers.
18
19 * 2. long file names: Micro$oft has finally come to their senses and
20 * uses a more standard mapping for the long file names. They use
21 * Unicode, which is basically a 32 bit version of ASCII. Its first
22 * 256 characters are identical to Unix ASCII. Thus, the code page
23 * also affects the correspondence between the codes used in long
24 * names and those used in short names.
25
26 * Such a bad design is rather unbelievable. That's why I quoted the
27 * translation tables. BEGIN FAIR USE EXCERPT:
28 */
29
30unsigned char toucase[][128]={
31 /* 0 */
32 /* 437 German Umlauts upcased, French accents
33 * upcased and lose accent */
34 { 0x80, 0x9a, 0x45, 0x41, 0x8e, 0x41, 0x8f, 0x80,
35 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x8e, 0x8f,
36 0x90, 0x92, 0x92, 0x4f, 0x99, 0x4f, 0x55, 0x55,
37 0x59, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
38 0x41, 0x49, 0x4f, 0x55, 0xa5, 0xa5, 0xa6, 0xa7,
39 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
40 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
41 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd,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8f,
90 0x90, 0x92, 0x92, 0x4f, 0x99, 0x4f, 0x55, 0x55,
91 0x59, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
92 0x41, 0x49, 0x4f, 0x55, 0xa5, 0xa5, 0xa6, 0xa7,
93 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
94 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
95 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
96 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
97 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
98 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
99 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
100 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
101 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
102 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
103 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
104
105 /* 4
106 * 437: all accented characters lose their accent */
107 { 0x80, 0x55, 0x45, 0x41, 0x41, 0x41, 0x8f, 0x80,
108 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x41, 0x8f,
109 0x45, 0x92, 0x92, 0x4f, 0x4f, 0x4f, 0x55, 0x55,
110 0x98, 0x4f, 0x55, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
111 0x41, 0x49, 0x4f, 0x55, 0xa5, 0xa5, 0xa6, 0xa7,
112 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
113 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0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0xdf,
137 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
138 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
139 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
140 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
141
142 /* 6 All accented characters lose their accent
143 when upcased. C loses cedilla. æ upcased. ø
144 loses slash. Ð, ñ, ß intact */
145 { 0x43, 0x55, 0x45, 0x41, 0x41, 0x41, 0x41, 0x43,
146 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x41, 0x41,
147 0x45, 0x92, 0x92, 0x4f, 0x4f, 0x4f, 0x55, 0x55,
148 0x59, 0x4f, 0x55, 0x4f, 0x9c, 0x4f, 0x9e, 0x9f,
149 0x41, 0x49, 0x4f, 0x55, 0xa5, 0xa5, 0xa6, 0xa7,
150 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
151 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0x41, 0x41, 0x41,
152 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
153 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0x41, 0x41,
154 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
155 0xd1, 0xd1, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49,
156 0x49, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0x49, 0xdf,
157 0x4f, 0xe1, 0x4f, 0x4f, 0x4f, 0x4f, 0xe6, 0xe8,
158 0xe8, 0x55, 0x55, 0x55, 0x59, 0x59, 0xee, 0xef,
159 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
160 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
161
162 /* 7: As 6, but German Umlauts keep their Umlaut */
163 { 0x43, 0x9a, 0x45, 0x41, 0x8e, 0x41, 0x41, 0x43,
164 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x8e, 0x41,
165 0x45, 0x92, 0x92, 0x4f, 0x99, 0x4f, 0x55, 0x55,
166 0x59, 0x99, 0x9a, 0x4f, 0x9c, 0x4f, 0x9e, 0x9f,
167 0x41, 0x49, 0x4f, 0x55, 0xa5, 0xa5, 0xa6, 0xa7,
168 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
169 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0x41, 0x41, 0x41,
170 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
171 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0x41, 0x41,
172 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
173 0xd1, 0xd1, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49,
174 0x49, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0x49, 0xdf,
175 0x4f, 0xe1, 0x4f, 0x4f, 0x4f, 0x4f, 0xe6, 0xe8,
176 0xe8, 0x55, 0x55, 0x55, 0x59, 0x59, 0xee, 0xef,
177 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
178 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
179
180 /* 8: All characters except ÿ keep their accent
181 */
182 { 0x80, 0x9a, 0x90, 0xb6, 0x8e, 0xb7, 0x8f, 0x80,
183 0xd2, 0xd3, 0xd4, 0xd8, 0xd7, 0xde, 0x8e, 0x8f,
184 0x90, 0x92, 0x92, 0xe2, 0x99, 0xe3, 0xea, 0xeb,
185 0x59, 0x99, 0x9a, 0x9d, 0x9c, 0x9d, 0x9e, 0x9f,
186 0xb5, 0xd6, 0xe0, 0xe9, 0xa5, 0xa5, 0xa6, 0xa7,
187 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
188 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
189 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
190 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc7, 0xc7,
191 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
192 0xd1, 0xd1, 0xd2, 0xd3, 0xd4, 0x49, 0xd6, 0xd7,
193 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
194 0xe0, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe8,
195 0xe8, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef,
196 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
197 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
198
199 /* 9: As 6, but Ç and Å preserved */
200 { 0x80, 0x55, 0x45, 0x41, 0x41, 0x41, 0x8f, 0x80,
201 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x41, 0x8f,
202 0x45, 0x92, 0x92, 0x4f, 0x4f, 0x4f, 0x55, 0x55,
203 0x98, 0x4f, 0x55, 0x4f, 0x9c, 0x4f, 0x9e, 0x9f,
204 0x41, 0x49, 0x4f, 0x55, 0xa5, 0xa5, 0xa6, 0xa7,
205 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
206 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0x41, 0x41, 0x41,
207 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
208 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0x41, 0x41,
209 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
210 0xd1, 0xd1, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49,
211 0x49, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0x49, 0xdf,
212 0x4f, 0xe1, 0x4f, 0x4f, 0x4f, 0x4f, 0xe6, 0xe8,
213 0xe8, 0x55, 0x55, 0x55, 0x59, 0x59, 0xee, 0xef,
214 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
215 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
216
217 /* 10: every accented character keeps its accent */
218 { 0x80, 0x9a, 0x90, 0xb6, 0x8e, 0xb7, 0x8f, 0x80,
219 0xd2, 0xd3, 0xd4, 0xd8, 0xd7, 0xde, 0x8e, 0x8f,
220 0x90, 0x92, 0x92, 0xe2, 0x99, 0xe3, 0xea, 0xeb,
221 0x98, 0x99, 0x9a, 0x9d, 0x9c, 0x9d, 0x9e, 0x9f,
222 0xb5, 0xd6, 0xe0, 0xe9, 0xa5, 0xa5, 0xa6, 0xa7,
223 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
224 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
225 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
226 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc7, 0xc7,
227 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
228 0xd1, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
229 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
230 0xe0, 0xe1, 0xe2, 0xe3, 0xe5, 0xe5, 0xe6, 0xe8,
231 0xe8, 0xe9, 0xea, 0xeb, 0xed, 0xed, 0xee, 0xef,
232 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
233 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
234
235 /* 11 */
236 { 0x80, 0x9a, 0x90, 0xb6, 0x8e, 0xde, 0x8f, 0x80,
237 0x9d, 0xd3, 0x8a, 0x8a, 0xd7, 0x8d, 0x8e, 0x8f,
238 0x90, 0x91, 0x91, 0xe2, 0x99, 0x95, 0x95, 0x97,
239 0x97, 0x99, 0x9a, 0x9b, 0x9b, 0x9d, 0x9e, 0xac,
240 0xb5, 0xd6, 0xe0, 0xe9, 0xa4, 0xa4, 0xa6, 0xa6,
241 0xa8, 0xa8, 0xaa, 0x8d, 0xac, 0xb8, 0xae, 0xaf,
242 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
243 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbd, 0xbf,
244 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc6,
245 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
246 0xd1, 0xd1, 0xd2, 0xd3, 0xd2, 0xd5, 0xd6, 0xd7,
247 0xb7, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
248 0xe0, 0xe1, 0xe2, 0xe3, 0xe3, 0xd5, 0xe6, 0xe6,
249 0xe8, 0xe9, 0xe8, 0xeb, 0xed, 0xed, 0xdd, 0xef,
250 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
251 0xf8, 0xf9, 0xfa, 0xeb, 0xfc, 0xfc, 0xfe, 0xff },
252
253
254 /* 14 All accented characters lose their accent, C loses cedilla,
255 * ø loses slash. æ upcased. Ð, ñ, ß intact */
256 { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
257 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
258
259 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
260 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
261
262 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
263 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
264
265 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
266 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
267
268 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xc6, 0x43,
269 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
270
271 0xd0, 0xd1, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0xd7,
272 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0xde, 0xdf,
273
274 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0xc6, 0x43,
275 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
276
277 0xd0, 0xd1, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0xf7,
278 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0xde, 0x59 },
279
280
281
282 /* 15 as 14, but German Umlauts (ä, ö, ü) keep their Umlaut when
283 upcased */
284 { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
285 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
286
287 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
288 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
289
290 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
291 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
292
293 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
294 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
295
296 0x41, 0x41, 0x41, 0x41, 0xc4, 0x41, 0xc6, 0x43,
297 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
298
299 0xd0, 0xd1, 0x4f, 0x4f, 0x4f, 0x4f, 0xd6, 0xd7,
300 0x4f, 0x55, 0x55, 0x55, 0xdc, 0x59, 0xde, 0xdf,
301
302 0x41, 0x41, 0x41, 0x41, 0xc4, 0x41, 0xc6, 0x43,
303 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
304
305 0xd0, 0xd1, 0x4f, 0x4f, 0x4f, 0x4f, 0xd6, 0xf7,
306 0x4f, 0x55, 0x55, 0x55, 0xdc, 0x59, 0xde, 0x59 },
307
308
309 /* 16 every accented character except ÿ keeps its accent */
310 { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
311 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
312
313 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
314 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
315
316 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
317 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
318
319 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
320 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
321
322 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
323 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
324
325 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
326 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
327
328 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
329 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
330
331 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xf7,
332 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0x59 },
333
334
335
336 /* 17: As 6, but Ç, Å and ÿ preserved */
337 { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
338 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
339
340 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
341 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
342
343 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
344 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
345
346 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
347 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
348
349 0x41, 0x41, 0x41, 0x41, 0x41, 0xc5, 0xc6, 0xc7,
350 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
351
352 0xd0, 0xd1, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0xd7,
353 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0xde, 0xdf,
354
355 0x41, 0x41, 0x41, 0x41, 0x41, 0xc5, 0xc6, 0xc7,
356 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49,
357
358 0xd0, 0xd1, 0x4f, 0x4f, 0x4f, 0x4f, 0x4f, 0xf7,
359 0x4f, 0x55, 0x55, 0x55, 0x55, 0x59, 0xde, 0xff },
360
361
362 /* 18 every accented character keeps its accent */
363 { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
364 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
365
366 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
367 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
368
369 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
370 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
371
372 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
373 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
374
375 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
376 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
377
378 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
379 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
380
381 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
382 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
383
384 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xf7,
385 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xff },
386
387
388 /* 19 */
389 { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
390 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
391 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
392 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f,
393 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7,
394 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf,
395 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7,
396 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf,
397 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7,
398 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf,
399 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7,
400 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf,
401 0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7,
402 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef,
403 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7,
404 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff },
405
406};
407
408country_t countries[]={
409 { 1, 437, 437, 0 },
410 { 1, 850, 437, 6 },
411 { 1, 819, 437, 14 },
412 { 44, 437, 437, 0 },
413 { 44, 850, 437, 6 },
414 { 44, 819, 437, 14 },
415 { 33, 437, 437, 0 },
416 { 33, 850, 437, 6 },
417 { 33, 819, 437, 14 },
418 { 49, 437, 437, 0 },
419 { 49, 850, 437, 7 },
420 { 49, 819, 437, 15 },
421 { 34, 850, 437, 8 },
422 { 34, 819, 437, 16 },
423 { 34, 437, 437, 0 },
424 { 39, 437, 437, 0 },
425 { 39, 850, 437, 6 },
426 { 39, 819, 437, 14 },
427 { 46, 437, 437, 3 },
428 { 46, 850, 437, 8 },
429 { 46, 819, 437, 16 },
430 { 45, 850, 865, 8 },
431 { 45, 819, 865, 16 },
432 { 45, 865, 865, 2 },
433 { 41, 850, 437, 8 },
434 { 41, 819, 437, 16 },
435 { 41, 437, 437, 3 },
436 { 47, 850, 865, 8 },
437 { 47, 819, 865, 16 },
438 { 47, 865, 865, 2 },
439 { 31, 437, 437, 4 },
440 { 31, 850, 437, 9 },
441 { 31, 819, 437, 17 },
442 { 32, 850, 437, 8 },
443 { 32, 819, 437, 16 },
444 { 32, 437, 437, 3 },
445 { 358, 850, 437, 8 },
446 { 358, 819, 437, 16 },
447 { 358, 437, 437, 3 },
448 { 2, 863, 863, 1 },
449 { 2, 850, 863, 6 },
450 { 2, 819, 863, 14 },
451 { 351, 850, 860, 6 },
452 { 351, 819, 860, 14 },
453 { 351, 860, 860, 5 },
454 { 3, 850, 437, 8 },
455 { 3, 819, 437, 16 },
456 { 3, 437, 437, 0 },
457 { 61, 437, 437, 0 },
458 { 61, 850, 437, 6 },
459 { 61, 819, 437, 16 },
460 { 81, 437, 437, 0 },
461 { 81, 819, 437, 14 },
462 { 82, 437, 437, 0 },
463 { 82, 819, 437, 14 },
464 { 86, 437, 437, 0 },
465 { 86, 819, 437, 14 },
466 { 88, 437, 437, 0 },
467 { 88, 819, 437, 14 },
468 { 55, 850, 850, 10 },
469 { 55, 819, 850, 18 },
470 { 55, 437, 850, 0 },
471 { 354, 850, 850, 10 },
472 { 354, 819, 850, 18 },
473 { 90, 850, 850, 10 },
474 { 90, 819, 850, 18 },
475 { 38, 852, 852, 11 },
476 { 38, 850, 852, 10 },
477 { 38, 819, 852, 18 },
478 { 42, 852, 852, 11 },
479 { 42, 850, 852, 10 },
480 { 42, 819, 852, 18 },
481 { 48, 852, 852, 11 },
482 { 48, 850, 852, 10 },
483 { 48, 819, 852, 18 },
484 { 36, 852, 852, 11 },
485 { 36, 850, 852, 10 },
486 { 36, 819, 852, 18 },
487 { 886, 950, 950, 19 }, /* for Taiwan support (Country code) */
488 { 0, 0, 0, 0 }
489};
490
491/* END FAIR USE EXCERPT */
Note: See TracBrowser for help on using the repository browser.