3 #include "ckcdeb.h" /* Includes... */
13 char *xlav = "Character Set Translation 8.0.042, 3 Jul 2000";
17 /* C-Kermit tables and functions supporting character set translation. */
19 Author: Frank da Cruz <fdc@columbia.edu>,
20 Columbia University Academic Information Systems, New York City.
22 Copyright (C) 1985, 2004,
23 Trustees of Columbia University in the City of New York.
24 All rights reserved. See the C-Kermit COPYING.TXT file or the
25 copyright text in the ckcmai.c module for disclaimer and permissions.
28 /* Character set translation data and functions */
30 extern int zincnt; /* File i/o macros and variables */
37 int tslevel = TS_L0; /* Transfer syntax level (0,1,2) */
38 int tcharset = TC_TRANSP; /* Transfer syntax character set */
39 int tcs_save = -1; /* For save/restore term charset */
40 int tcs_transp = 0; /* Term charset is TRANSPARENT flag */
43 int tcsr = TX_8859_1; /* Remote terminal character set */
45 int tcsr = FC_USASCII;
47 int language = L_USASCII; /* Language */
50 int ucsbom = 1; /* Add BOM to new UCS files? */
51 int ucsorder = -1; /* Default byte order for UCS files */
52 int fileorder = -1; /* Byte order of current file */
56 Default local file and terminal character set.
57 Normally ASCII, but for some systems we know otherwise.
60 #ifdef datageneral /* Data General AOS/VS */
61 int fcharset = FC_DGMCS; /* uses the DG International set */
62 int dcset8 = FC_DGMCS;
63 int dcset7 = FC_USASCII;
66 #ifdef NEXT /* The NeXT workstation */
67 int fcharset = FC_NEXT; /* uses its own 8-bit set */
69 int dcset7 = FC_USASCII;
72 #ifdef MAC /* The Macintosh */
73 int fcharset = FC_APPQD; /* uses an extended version of */
74 int dcset8 = FC_APPQD;
75 int dcset7 = FC_USASCII;
76 int tcsl = FC_APPQD; /* Apple Quickdraw */
79 int fcharset = FC_APPQD; /* Ditto for Apple A/UX */
80 int dcset8 = FC_APPQD;
81 int dcset7 = FC_USASCII;
84 #ifdef AMIGA /* The Commodore Amiga */
85 int fcharset = FC_1LATIN; /* uses Latin-1 */
86 int dcset8 = FC_1LATIN;
87 int dcset7 = FC_USASCII;
89 #else /* All others */
90 #ifdef CKOUNI /* OS/2 Unicode */
91 int fcharset = FC_1LATIN;
92 int dcset8 = FC_1LATIN;
93 int dcset7 = FC_USASCII;
96 #else /* All others */
97 int fcharset = FC_USASCII; /* use ASCII by default */
98 int dcset8 = FC_1LATIN; /* But default 8-bit set is Latin-1 */
99 int dcset7 = FC_USASCII;
100 int tcsl = FC_USASCII;
101 int prncs = FC_CP437;
107 #endif /* datageneral */
109 int s_cset = XMODE_A; /* SEND charset selection = AUTO */
110 int r_cset = XMODE_A; /* RECV charset selection = AUTO */
111 int afcset[MAXFCSETS+1]; /* Character-set associations */
112 int axcset[MAXTCSETS+1];
113 int xlatype = XLA_NONE; /* Translation type */
117 extern int (*xl_utc[MAXTCSETS+1])(USHORT); /* Unicode to TCS */
118 extern int (*xl_ufc[MAXFCSETS+1])(USHORT); /* Unicode to FCS */
119 extern USHORT (*xl_tcu[MAXTCSETS+1])(CHAR); /* TCS to Unicode */
120 extern USHORT (*xl_fcu[MAXFCSETS+1])(CHAR); /* FCS to Unicode */
122 extern int (*xl_utc[MAXTCSETS+1])();
123 extern int (*xl_ufc[MAXFCSETS+1])();
124 extern USHORT (*xl_tcu[MAXTCSETS+1])();
125 extern USHORT (*xl_fcu[MAXFCSETS+1])();
126 #endif /* CK_ANSIC */
129 /* Bureaucracy section */
131 _PROTOTYP( CHAR xnel1, (CHAR c) ); /* NeXT to Latin-1 */
132 _PROTOTYP( CHAR xl143, (CHAR c) ); /* Latin-1 to IBM CP437 */
133 _PROTOTYP( CHAR xl1as, (CHAR c) ); /* Latin-1 to US ASCII */
134 _PROTOTYP( CHAR zl1as, (CHAR c) ); /* Latin-1 to US ASCII */
137 _PROTOTYP( CHAR xassk, (CHAR c) ); /* ASCII to Short KOI */
138 _PROTOTYP( CHAR xskcy, (CHAR c) ); /* Short KOI to Latin/Cyrillic */
139 #endif /* CYRILLIC */
142 _PROTOTYP( CHAR xnel2, (CHAR c) ); /* NeXT to Latin-2 */
143 _PROTOTYP( CHAR xl243, (CHAR c) ); /* Latin-2 to IBM CP437 */
144 _PROTOTYP( CHAR xl2as, (CHAR c) ); /* Latin-2 to US ASCII */
145 _PROTOTYP( CHAR zl2as, (CHAR c) ); /* Latin-2 to US ASCII */
146 _PROTOTYP( CHAR xl2r8, (CHAR c) ); /* Latin-2 to HP */
147 _PROTOTYP( CHAR xl2l9, (CHAR c) ); /* Latin-2 to Latin-9 */
148 _PROTOTYP( CHAR xl9l2, (CHAR c) ); /* Latin-9 to Latin-2 */
149 _PROTOTYP( CHAR xl2mz, (CHAR c) ); /* Latin-2 to Mazovia */
150 _PROTOTYP( CHAR xmzl2, (CHAR c) ); /* Mazovia to Latin-2 */
151 _PROTOTYP( CHAR xl1mz, (CHAR c) ); /* Latin-1 to Mazovia */
152 _PROTOTYP( CHAR xmzl1, (CHAR c) ); /* Mazovia to Latin-1 */
153 _PROTOTYP( CHAR xmzl9, (CHAR c) ); /* Latin-9 to Mazovia */
154 _PROTOTYP( CHAR xl9mz, (CHAR c) ); /* Mazovia to Latin-9 */
157 /* Transfer character-set info */
159 struct csinfo tcsinfo[] = {
160 /* Name size code designator alphabet keyword */
161 "TRANSPARENT", 256,TC_TRANSP, "", AL_UNK, "transparent", /* 0 */
162 "ASCII", 128,TC_USASCII,"", AL_ROMAN,"ascii", /* 1 */
163 "ISO 8859-1 Latin-1",256,TC_1LATIN, "I6/100",AL_ROMAN,"latin1-iso", /* 2 */
165 "ISO 8859-2 Latin-2",256,TC_2LATIN, "I6/101",AL_ROMAN,"latin2-iso", /* 3 */
169 "ISO 8859-5 Latin/Cyrillic",256,TC_CYRILL,"I6/144",AL_CYRIL,"cyrillic-iso",
170 #endif /* CYRILLIC */
172 "Japanese EUC",16384,TC_JEUC, "I14/87/13", AL_JAPAN, "euc-jp", /* 5 */
176 "ISO 8859-8 Latin/Hebrew",256,TC_HEBREW,"I6/138",AL_HEBREW,"hebrew-iso",
179 "ISO 8859-7 Latin/Greek",256,TC_GREEK,"I6/126",AL_GREEK,"greek-iso", /* 7 */
181 "ISO 8859-15 Latin-9",256,TC_9LATIN,"I6/203",AL_ROMAN,"latin9-iso", /* 8 */
182 "ISO 10646 / Unicode UCS-2",64000,TC_UCS2,"I162",AL_UNIV,"ucs2", /* 9 */
183 "ISO 10646 / Unicode UTF-8",64000,TC_UTF8,"I190",AL_UNIV,"utf8", /* 10 */
186 int ntcsets = (sizeof(tcsinfo) / sizeof(struct csinfo)) - 1;
188 struct keytab tcstab[] = { /* Keyword table for */
189 "ascii", TC_USASCII, 0, /* SET TRANSFER CHARACTER-SET */
191 "cyrillic-iso", TC_CYRILL, 0,
192 #endif /* CYRILLIC */
194 "elot928-greek", TC_GREEK, CM_INV,
197 "euc-jp", TC_JEUC, 0,
200 "greek-iso", TC_GREEK, 0,
203 "hebrew-iso", TC_HEBREW, 0,
206 "japanese-euc", TC_JEUC, CM_INV,
208 "l", TC_1LATIN, CM_ABR|CM_INV,
209 "la", TC_1LATIN, CM_ABR|CM_INV,
210 "lat", TC_1LATIN, CM_ABR|CM_INV,
211 "lati", TC_1LATIN, CM_ABR|CM_INV,
212 "latin", TC_1LATIN, CM_ABR|CM_INV,
213 "latin1-iso", TC_1LATIN, 0,
215 "latin2-iso", TC_2LATIN, 0,
217 "latin9-iso", TC_9LATIN, 0,
218 "transparent", TC_TRANSP, 0,
225 int ntcs = (sizeof(tcstab) / sizeof(struct keytab)) - 1;
227 /* File character set information structure, indexed by character set code, */
228 /* as defined in ckuxla.h. This table must be in order of file character */
231 struct csinfo fcsinfo[] = { /* File character set information... */
232 /* Descriptive Name Size Designator */
233 "US ASCII", 128, FC_USASCII, NULL, AL_ROMAN, "ascii",
234 "British/UK ISO-646", 128, FC_UKASCII, NULL, AL_ROMAN, "british",
235 "Dutch ISO-646", 128, FC_DUASCII, NULL, AL_ROMAN, "dutch",
236 "Finnish ISO-646", 128, FC_FIASCII, NULL, AL_ROMAN, "finnish",
237 "French ISO-646", 128, FC_FRASCII, NULL, AL_ROMAN, "french",
238 "Canadian-French NRC", 128, FC_FCASCII, NULL, AL_ROMAN, "canadian-french",
239 "German ISO-646", 128, FC_GEASCII, NULL, AL_ROMAN, "german",
240 "Hungarian ISO-646", 128, FC_HUASCII, NULL, AL_ROMAN, "hungarian",
241 "Italian ISO-646", 128, FC_ITASCII, NULL, AL_ROMAN, "italian",
242 "Norwegian/Danish ISO-646",128,FC_NOASCII,NULL,AL_ROMAN,"norwegian/danish",
243 "Portuguese ISO-646", 128, FC_POASCII, NULL, AL_ROMAN,"portuguese",
244 "Spanish ISO-646", 128, FC_SPASCII, NULL, AL_ROMAN, "spanish",
245 "Swedish ISO-646", 128, FC_SWASCII, NULL, AL_ROMAN, "swedish",
246 "Swiss NRC", 128, FC_CHASCII, NULL, AL_ROMAN, "swiss",
247 "ISO 8859-1 Latin-1", 256, FC_1LATIN, NULL, AL_ROMAN,"latin1-iso",
248 "ISO 8859-2 Latin-2", 256, FC_2LATIN, NULL, AL_ROMAN,"latin2-iso",
249 "DEC Multinational", 256, FC_DECMCS, NULL,AL_ROMAN,"dec-multinational",
250 "NeXT Multinational", 256, FC_NEXT, NULL,AL_ROMAN,"next-multinational",
251 "PC Code Page 437", 256, FC_CP437, NULL, AL_ROMAN,"cp437",
252 "PC Code Page 850", 256, FC_CP850, NULL, AL_ROMAN,"cp850",
253 "PC Code Page 852", 256, FC_CP852, NULL, AL_ROMAN,"cp852",
254 "Apple Macintosh Latin", 256, FC_APPQD, NULL, AL_ROMAN,"macintosh-latin",
255 "Data General International",256,FC_DGMCS,NULL,AL_ROMAN,"dg-international",
256 "Hewlett Packard Roman8", 256, FC_HPR8, NULL, AL_ROMAN, "hp-roman8",
257 "ISO 8859-5 Latin/Cyrillic", 256, FC_CYRILL, NULL, AL_CYRIL,"cyrillic-iso",
258 "CP866 Cyrillic", 256, FC_CP866, NULL, AL_CYRIL,"cp866",
259 "Short KOI", 128, FC_KOI7, NULL, AL_CYRIL,"short-koi",
260 "Old KOI-8 Cyrillic", 256, FC_KOI8, NULL, AL_CYRIL,"koi8-cyrillic",
261 "Japanese JIS7", 16384, FC_JIS7, NULL, AL_JAPAN, "jis7-kanji",
262 "Japanese Shift JIS", 16384, FC_SHJIS, NULL, AL_JAPAN, "shift-jis-kanji",
263 "Japanese EUC", 16384, FC_JEUC, NULL, AL_JAPAN, "euc-jp",
264 "Japanese DEC Kanji", 16384, FC_JDEC, NULL, AL_JAPAN, "dec-kanji",
265 "Hebrew-7 DEC", 128, FC_HE7, NULL, AL_HEBREW, "hebrew-7",
266 "ISO 8859-8 Latin/Hebrew",256, FC_HEBREW, NULL, AL_HEBREW, "hebrew-iso",
267 "CP862 Hebrew", 256, FC_CP862, NULL, AL_HEBREW, "cp862-hebrew",
268 "ELOT 927 Greek", 128, FC_ELOT, NULL, AL_GREEK, "elot927-greek",
269 "ISO 8859-7 Latin/Greek", 256, FC_GREEK, NULL, AL_GREEK, "greek-iso",
270 "CP869 Greek", 256, FC_CP869, NULL, AL_GREEK, "cp869-greek",
271 "ISO 8859-15 Latin-9", 256, FC_9LATIN, NULL, AL_ROMAN, "latin9-iso",
272 "PC Code Page 858", 256, FC_CP850, NULL, AL_ROMAN, "cp858",
273 "PC Code Page 855", 256, FC_CP855, NULL, AL_CYRIL, "cp855-cyrillic",
274 "Windows Code Page 1251", 256, FC_CP1251, NULL, AL_CYRIL, "cp1251-cyrillic",
275 "Bulgarian PC Code Page", 256, FC_BULGAR, NULL, AL_CYRIL, "bulgaria-pc",
276 "Windows Code Page 1250", 256, FC_CP1250, NULL, AL_ROMAN, "cp1250",
277 "Polish Mazovia PC Code Page", 256, FC_MAZOVIA, NULL, AL_ROMAN, "mazovia-pc",
278 "ISO 10646 / Unicode UCS-2", 64000, FC_UCS2, NULL, AL_UNIV, "ucs2",
279 "ISO 10646 / Unicode UTF-8", 64000, FC_UCS2, NULL, AL_UNIV, "utf8",
280 "KOI8-R Russian+Boxdrawing",256, FC_KOI8R, NULL, AL_CYRIL,"koi8r",
281 "KOI8-U Ukrainian+Boxdrawing",256,FC_KOI8U, NULL, AL_CYRIL,"koi8u",
282 "Windows Code Page 1252", 256, FC_CP1252, NULL, AL_ROMAN, "cp1252",
286 /* Local file character sets */
287 /* Includes 7-bit National Replacement Character Sets of ISO 646 */
288 /* Plus ISO Latin-1, DEC Multinational Character Set (MCS), NeXT char set, */
289 /* Various PC and Windows code pages, etc. */
291 struct keytab fcstab[] = { /* Keyword table for 'set file character-set' */
293 IMPORTANT: This table is replicated below as ttcstab (terminal character
294 set table). The only differences are the addition of TRANSPARENT
295 and the removal of the Kanji sets, which are not supported yet.
296 If you make changes to this table, also change ttcstab.
299 /* Keyword Value Flags */
300 "apple-quickdraw", FC_APPQD, CM_INV, /* Apple Quickdraw */
301 "ascii", FC_USASCII, 0, /* ASCII */
302 "british", FC_UKASCII, 0, /* British NRC */
303 "bulgaria-pc", FC_BULGAR, 0, /* Bulgarian PC Code Page */
304 "canadian-french", FC_FCASCII, 0, /* French Canadian NRC */
306 "cp1250", FC_CP1250, 0, /* Windows CP 1250 */
309 "cp1251-cyrillic", FC_CP1251, 0, /* Windows CP 1251 */
310 #endif /* CYRILLIC */
311 "cp1252", FC_CP1252, 0, /* Windows CP 1252 */
312 "cp437", FC_CP437, 0, /* PC CP437 */
313 "cp850", FC_CP850, 0, /* PC CP850 */
315 "cp852", FC_CP852, 0, /* PC CP852 */
318 "cp855-cyrillic", FC_CP855, 0, /* PC CP855 */
319 #endif /* CYRILLIC */
320 "cp858", FC_CP858, 0, /* PC CP858 */
322 "cp862-hebrew", FC_CP862, 0, /* PC CP862 */
325 "cp866-cyrillic", FC_CP866, 0, /* CP866 Cyrillic */
326 #endif /* CYRILLIC */
328 "cp869-greek", FC_CP869, 0, /* CP869 Greek */
331 "cyrillic-iso", FC_CYRILL, 0, /* ISO Latin/Cyrillic Alphabet */
332 #endif /* CYRILLIC */
333 "danish", FC_NOASCII, 0, /* Norwegian and Danish NRC */
335 "dec-kanji", FC_JDEC, 0, /* Japanese DEC Kanji */
337 "dec-multinational", FC_DECMCS, 0, /* DEC multinational character set */
338 "dg-international", FC_DGMCS, 0, /* Data General multinational */
339 "dutch", FC_DUASCII, 0, /* Dutch NRC */
341 "elot927-greek", FC_ELOT, 0, /* ELOT 927 Greek */
342 "elot928-greek", FC_GREEK, 0, /* Same as ISO 8859-7 Latin/Greek */
345 "euc-jp", FC_JEUC, 0, /* Japanese EUC */
347 "finnish", FC_FIASCII, 0, /* Finnish NRC */
348 "french", FC_FRASCII, 0, /* French NRC */
349 "fr-canadian", FC_FCASCII, CM_INV, /* French Canadian NRC */
350 "german", FC_GEASCII, 0, /* German NRC */
352 "greek-iso", FC_GREEK, 0, /* ISO 8859-7 Latin/Greek */
355 "he", FC_HEBREW, CM_ABR|CM_INV,
356 "heb", FC_HEBREW, CM_ABR|CM_INV,
357 "hebr", FC_HEBREW, CM_ABR|CM_INV,
358 "hebre", FC_HEBREW, CM_ABR|CM_INV,
359 "hebrew", FC_HEBREW, CM_ABR|CM_INV,
360 "hebrew-7", FC_HE7, 0, /* DEC 7-Bit Hebrew */
361 "hebrew-iso", FC_HEBREW, 0, /* ISO Latin/Hebrew */
363 "hp-roman8", FC_HPR8, 0, /* Hewlett Packard Roman8 */
364 "hungarian", FC_HUASCII, 0, /* Hungarian NRC */
366 "iso2022jp-kanji", FC_JIS7, 0, /* Synonym for JIS-7 */
368 "italian", FC_ITASCII, 0, /* Italian NRC */
370 "japanese-euc", FC_JEUC, CM_INV, /* Japanese EUC */
371 "jis7-kanji", FC_JIS7, 0, /* Japanese JIS7 7bit code */
374 "k", FC_KOI8, CM_ABR|CM_INV,
375 "ko", FC_KOI8, CM_ABR|CM_INV,
376 "koi", FC_KOI8, CM_ABR|CM_INV,
377 "koi8", FC_KOI8, 0, /* Old KOI-8 Cyrillic */
378 "koi8-cyrillic", FC_KOI8, CM_INV,
379 "koi8r", FC_KOI8R, 0, /* KOI8-R RFC1489 */
380 "koi8u", FC_KOI8U, 0, /* KOI8-U RFC2319 */
381 #endif /* CYRILLIC */
382 "l", FC_1LATIN, CM_ABR|CM_INV,
383 "la", FC_1LATIN, CM_ABR|CM_INV,
384 "lat", FC_1LATIN, CM_ABR|CM_INV,
385 "lati", FC_1LATIN, CM_ABR|CM_INV,
386 "latin", FC_1LATIN, CM_ABR|CM_INV,
387 "latin1-iso", FC_1LATIN, 0, /* ISO Latin Alphabet 1 */
389 "latin2-iso", FC_2LATIN, 0, /* ISO Latin Alphabet 2 */
391 "latin9-iso", FC_9LATIN, 0, /* ISO Latin Alphabet 9 */
392 "macintosh-latin", FC_APPQD, 0, /* "Extended Mac Latin" */
394 "mazovia-pc", FC_MAZOVIA, 0, /* Polish Mazovia PC code page */
396 "next-multinational", FC_NEXT, 0, /* NeXT workstation */
397 "norwegian", FC_NOASCII, 0, /* Norwegian and Danish NRC */
398 "portuguese", FC_POASCII, 0, /* Portuguese NRC */
400 "shift-jis-kanji", FC_SHJIS, 0, /* Japanese Kanji Shift-JIS */
403 "short-koi", FC_KOI7, 0, /* Short KOI Cyrillic */
404 #endif /* CYRILLIC */
405 "spanish", FC_SPASCII, 0, /* Spanish NRC */
406 "swedish", FC_SWASCII, 0, /* Swedish NRC */
407 "swiss", FC_CHASCII, 0, /* Swiss NRC */
409 "ucs2", FC_UCS2, 0, /* ISO 10646 / Unicode UCS-2 */
410 "utf8", FC_UTF8, 0, /* ISO 10646 / Unicode UTF-8 */
414 int nfilc = (sizeof(fcstab) / sizeof(struct keytab)) - 1;
416 struct keytab ttcstab[] = { /* Keyword table for SET TERMINAL CHARACTER-SET */
418 IMPORTANT: This table is a replica of fcstab, immediately above, with the
419 addition of TRANSPARENT and deletion of the Japanese sets. If you make
420 changes to this table, make the corresponding changes to fcstab.
422 /* Keyword Value Flags */
423 "apple-quickdraw", FC_APPQD, CM_INV, /* Apple Quickdraw */
424 "ascii", FC_USASCII, 0, /* ASCII */
425 "british", FC_UKASCII, 0, /* British NRC */
426 "bulgaria-pc", FC_BULGAR, 0, /* Bulgarian PC Code Page */
427 "canadian-french", FC_FCASCII, 0, /* French Canadian NRC */
429 "cp1250", FC_CP1250, 0, /* Windows CP 1250 */
432 "cp1251-cyrillic", FC_CP1251, 0, /* Windows CP 1251 */
433 #endif /* CYRILLIC */
434 "cp1252", FC_CP1252, 0, /* Windows CP 1252 */
435 "cp437", FC_CP437, 0, /* IBM CP437 */
436 "cp850", FC_CP850, 0, /* IBM CP850 */
438 "cp852", FC_CP852, 0, /* IBM CP852 */
441 "cp855-cyrillic", FC_CP855, 0, /* PC CP855 */
442 #endif /* CYRILLIC */
443 "cp858", FC_CP858, 0, /* PC CP858 */
445 "cp862-hebrew", FC_CP862, 0, /* PC CP862 */
448 "cp866-cyrillic", FC_CP866, 0, /* CP866 Cyrillic */
449 #endif /* CYRILLIC */
451 "cp869-greek", FC_CP869, 0, /* CP869 Greek */
454 "cyrillic-iso", FC_CYRILL, 0, /* ISO Latin/Cyrillic Alphabet */
455 #endif /* CYRILLIC */
456 "danish", FC_NOASCII, 0, /* Norwegian and Danish NRC */
459 "dec-kanji", FC_JDEC, 0, /* Japanese DEC Kanji */
462 "dec-multinational", FC_DECMCS, 0, /* DEC multinational character set */
463 "dg-international", FC_DGMCS, 0, /* Data General multinational */
464 "dutch", FC_DUASCII, 0, /* Dutch NRC */
466 "elot927-greek", FC_ELOT, 0, /* ELOT 927 Greek */
467 "elot928-greek", FC_GREEK, 0, /* Same as ISO 8859-7 Latin/Greek */
469 "finnish", FC_FIASCII, 0, /* Finnish NRC */
470 "french", FC_FRASCII, 0, /* French NRC */
471 "fr-canadian", FC_FCASCII, CM_INV, /* French Canadian NRC */
472 "german", FC_GEASCII, 0, /* German NRC */
474 "greek-iso", FC_GREEK, 0, /* ISO 8859-7 Latin/Greek */
477 "he", FC_HEBREW, CM_ABR|CM_INV,
478 "heb", FC_HEBREW, CM_ABR|CM_INV,
479 "hebr", FC_HEBREW, CM_ABR|CM_INV,
480 "hebre", FC_HEBREW, CM_ABR|CM_INV,
481 "hebrew", FC_HEBREW, CM_ABR|CM_INV,
482 "hebrew-7", FC_HE7, 0, /* DEC 7-Bit Hebrew */
483 "hebrew-iso", FC_HEBREW, 0, /* ISO Latin/Hebrew */
485 "hp-roman8", FC_HPR8, 0, /* Hewlett Packard Roman8 */
486 "hungarian", FC_HUASCII, 0, /* Hungarian NRC */
487 "italian", FC_ITASCII, 0, /* Italian NRC */
489 /* Kanji terminal character sets not implemented yet */
491 "japanese-euc", FC_JEUC, 0, /* Japanese EUC */
492 "jis7-kanji", FC_JIS7, 0, /* Japanese JIS7 7bit code */
496 "k", FC_KOI8, CM_ABR|CM_INV,
497 "ko", FC_KOI8, CM_ABR|CM_INV,
498 "koi", FC_KOI8, CM_ABR|CM_INV,
499 "koi8", FC_KOI8, 0, /* Old KOI-8 Cyrillic */
500 "koi8-cyrillic", FC_KOI8, CM_INV,
501 "koi8r", FC_KOI8R, 0, /* KOI8-R RFC1489 */
502 "koi8u", FC_KOI8U, 0, /* KOI8-U RFC2319 */
503 #endif /* CYRILLIC */
504 "l", FC_1LATIN, CM_ABR|CM_INV,
505 "la", FC_1LATIN, CM_ABR|CM_INV,
506 "lat", FC_1LATIN, CM_ABR|CM_INV,
507 "lati", FC_1LATIN, CM_ABR|CM_INV,
508 "latin", FC_1LATIN, CM_ABR|CM_INV,
509 "latin1-iso", FC_1LATIN, 0, /* ISO Latin Alphabet 1 */
511 "latin2-iso", FC_2LATIN, 0, /* ISO Latin Alphabet 2 */
513 "latin9-iso", FC_9LATIN, 0, /* ISO Latin Alphabet 9 */
514 "macintosh-latin", FC_APPQD, 0, /* "Extended Mac Latin */
516 "mazovia-pc", FC_MAZOVIA, 0, /* Polish Mazovia PC code page */
518 "next-multinational", FC_NEXT, 0, /* NeXT workstation */
519 "norwegian", FC_NOASCII, 0, /* Norwegian and Danish NRC */
520 "portuguese", FC_POASCII, 0, /* Portuguese NRC */
522 /* Kanji terminal character sets not implemented yet. */
524 "shift-jis-kanji", FC_SHJIS, 0, /* Japanese Kanji Shift-JIS */
528 "short-koi", FC_KOI7, 0, /* Short KOI Cyrillic */
529 #endif /* CYRILLIC */
530 "spanish", FC_SPASCII, 0, /* Spanish NRC */
531 "swedish", FC_SWASCII, 0, /* Swedish NRC */
532 "swiss", FC_CHASCII, 0, /* Swiss NRC */
533 "transparent", FC_TRANSP, 0, /* Transparent */
535 "utf8", FC_UTF8, 0, /* ISO 10646 / Unicode UTF-8 */
539 int ntermc = (sizeof(ttcstab) / sizeof(struct keytab)) - 1;
541 /* This table contains the equivalent FCS number for each TCS. */
542 /* If the TC_xxx symbol definitions are ever changed, fix this table. */
543 /* Ditto if another TCS is added. */
546 cseqtab[MAXTCSETS+1] = { /* TCS/FCS equivalency table */
547 -1, /* 0 = Transparent */
548 FC_USASCII, /* 1 = ASCII */
549 FC_1LATIN, /* 2 = Latin-1 */
550 FC_2LATIN, /* 3 = Latin-2 */
551 FC_CYRILL, /* 4 = Latin/Cyrillic */
552 FC_JEUC, /* 5 = Japanese EUC */
553 FC_HEBREW, /* 6 = Latin/Hebrew */
554 FC_GREEK, /* 7 = Latin/Greek */
555 FC_9LATIN, /* 8 = Latin-9 */
556 FC_UCS2, /* 9 = UCS-2 */
557 FC_UTF8 /* 10 = UTF-8 */
563 This table allows C-Kermit to have a SET LANGUAGE command to apply special
564 language-specific rules when translating from a character set that contains
565 national characters into plain ASCII, like German umlaut-a becomes ae.
567 Originally, I thought it would be a good idea to let SET LANGUAGE also select
568 an appropriate FILE CHARACTER-SET and TRANSFER CHARACTER-SET automatically,
569 and these are included in the langinfo structure. Later I realized that this
570 was a bad idea. Any particular language (e.g. Dutch) can be represented by
571 many different and incompatible character sets.
573 (But we could use the new (1998) ASSOCIATE command for this...)
576 struct langinfo langs[] = {
577 /* Language code File Charset Xfer Charset Name */
578 L_USASCII, FC_USASCII, TC_USASCII, "ASCII (American English)",
579 L_DANISH, FC_NOASCII, TC_1LATIN, "Danish",
580 L_DUTCH, FC_DUASCII, TC_1LATIN, "Dutch",
581 L_FINNISH, FC_FIASCII, TC_1LATIN, "Finnish",
582 L_FRENCH, FC_FRASCII, TC_1LATIN, "French",
583 L_GERMAN, FC_GEASCII, TC_1LATIN, "German",
585 L_GREEK, FC_GREEK, TC_GREEK, "Greek",
588 L_HEBREW, FC_HEBREW, TC_HEBREW, "Hebrew",
590 L_HUNGARIAN, FC_HUASCII, TC_2LATIN, "Hungarian",
591 L_ICELANDIC, FC_USASCII, TC_1LATIN, "Icelandic",
592 L_ITALIAN, FC_ITASCII, TC_1LATIN, "Italian",
594 L_JAPANESE, FC_JEUC, TC_JEUC, "Japanese",
596 L_NORWEGIAN, FC_NOASCII, TC_1LATIN, "Norwegian",
597 L_PORTUGUESE, FC_POASCII, TC_1LATIN, "Portuguese",
599 L_RUSSIAN, FC_CP866, TC_CYRILL, "Russian",
600 #endif /* CYRILLIC */
601 L_SPANISH, FC_SPASCII, TC_1LATIN, "Spanish",
602 L_SWEDISH, FC_SWASCII, TC_1LATIN, "Swedish",
603 L_SWISS, FC_CHASCII, TC_1LATIN, "Swiss"
605 int nlangs = (sizeof(langs) / sizeof(struct langinfo));
608 Keyword table for the SET LANGUAGE command.
609 Only a few of these (German, Scandinavian, etc) actually do anything.
610 The language is used to invoke special translation rules when converting
611 from an 8-bit character set to ASCII; for example, German u-diaeresis
612 becomes "ue", Dutch y-diaeresis becomes "ij". Languages without associated
613 rules are invisible (CM_INV).
615 struct keytab lngtab[] = {
616 "ascii", L_USASCII, CM_INV,
617 "danish", L_DANISH, 0,
619 "english", L_USASCII, CM_INV,
620 "finnish", L_FINNISH, 0,
621 "french", L_FRENCH, 0,
622 "german", L_GERMAN, 0,
624 "greek", L_GREEK, CM_INV,
627 "hebrew", L_HEBREW, CM_INV,
629 "hungarian", L_HUNGARIAN, CM_INV,
630 "icelandic", L_ICELANDIC, 0,
631 "italian", L_ITALIAN, CM_INV,
633 "japanese", L_JAPANESE, CM_INV,
635 "norwegian", L_NORWEGIAN, 0,
636 "none", L_USASCII, 0,
637 "portuguese", L_PORTUGUESE, CM_INV,
639 "russian", L_RUSSIAN, 0,
640 #endif /* CYRILLIC */
641 "spanish", L_SPANISH, CM_INV,
642 "swedish", L_SWEDISH, 0,
644 "ukrainian", L_RUSSIAN, 0,
645 #endif /* CYRILLIC */
648 int nlng = (sizeof(lngtab) / sizeof(struct keytab)) - 1; /* how many */
651 /* Translation tables ... */
654 For each pair of (transfer,file) character sets, we need two translation
655 functions, one for sending, one for receiving.
659 Here is the first table, Latin-1 to ASCII, fully annotated...
660 This one is absolutely NOT invertible, since we're going from an 8-bit
661 set to a 7-bit set. Accented letters are mapped to unaccented
662 equivalents, C1 control characters are all translated to "?", etc.
665 yl1as[] = { /* ISO 8859-1 Latin Alphabet 1 to US ASCII */
666 /* Source character Description => Translation */
667 /* Dec row/col Set */
668 0, /* 000 00/00 C0 NUL Ctrl-@ => (self) */
669 1, /* 001 00/01 C0 SOH Ctrl-A => (self) */
670 2, /* 002 00/02 C0 STX Ctrl-B => (self) */
671 3, /* 003 00/03 C0 ETX Ctrl-C => (self) */
672 4, /* 004 00/04 C0 EOT Ctrl-D => (self) */
673 5, /* 005 00/05 C0 ENQ Ctrl-E => (self) */
674 6, /* 006 00/06 C0 ACK Ctrl-F => (self) */
675 7, /* 007 00/07 C0 BEL Ctrl-G => (self) */
676 8, /* 008 00/08 C0 BS Ctrl-H => (self) */
677 9, /* 009 00/09 C0 HT Ctrl-I => (self) */
678 10, /* 010 00/10 C0 LF Ctrl-J => (self) */
679 11, /* 011 00/11 C0 VT Ctrl-K => (self) */
680 12, /* 012 00/12 C0 FF Ctrl-L => (self) */
681 13, /* 013 00/13 C0 CR Ctrl-M => (self) */
682 14, /* 014 00/14 C0 SO Ctrl-N => (self) */
683 15, /* 015 00/15 C0 SI Ctrl-O => (self) */
684 16, /* 016 01/00 C0 DLE Ctrl-P => (self) */
685 17, /* 017 01/01 C0 DC1 Ctrl-Q => (self) */
686 18, /* 018 01/02 C0 DC2 Ctrl-R => (self) */
687 19, /* 019 01/03 C0 DC3 Ctrl-S => (self) */
688 20, /* 020 01/04 C0 DC4 Ctrl-T => (self) */
689 21, /* 021 01/05 C0 NAK Ctrl-U => (self) */
690 22, /* 022 01/06 C0 SYN Ctrl-V => (self) */
691 23, /* 023 01/07 C0 ETB Ctrl-W => (self) */
692 24, /* 024 01/08 C0 CAN Ctrl-X => (self) */
693 25, /* 025 01/09 C0 EM Ctrl-Y => (self) */
694 26, /* 026 01/10 C0 SUB Ctrl-Z => (self) */
695 27, /* 027 01/11 C0 ESC Ctrl-[ => (self) */
696 28, /* 028 01/12 C0 FS Ctrl-\ => (self) */
697 29, /* 029 01/13 C0 GS Ctrl-] => (self) */
698 30, /* 030 01/14 C0 RS Ctrl-^ => (self) */
699 31, /* 031 01/15 C0 US Ctrl-_ => (self) */
700 32, /* 032 02/00 SP Space => (self) */
701 33, /* 033 02/01 G0 ! Exclamation mark => (self) */
702 34, /* 034 02/02 G0 " Doublequote => (self) */
703 35, /* 035 02/03 G0 # Number sign => (self) */
704 36, /* 036 02/04 G0 $ Dollar sign => (self) */
705 37, /* 037 02/05 G0 % Percent sign => (self) */
706 38, /* 038 02/06 G0 & Ampersand => (self) */
707 39, /* 039 02/07 G0 ' Apostrophe => (self) */
708 40, /* 040 02/08 G0 ( Left parenthesis => (self) */
709 41, /* 041 02/09 G0 ) Right parenthesis => (self) */
710 42, /* 042 02/10 G0 * Asterisk => (self) */
711 43, /* 043 02/11 G0 + Plus sign => (self) */
712 44, /* 044 02/12 G0 , Comma => (self) */
713 45, /* 045 02/13 G0 - Hyphen, minus sign => (self) */
714 46, /* 046 02/14 G0 . Period, full stop => (self) */
715 47, /* 047 02/15 G0 / Slash, solidus => (self) */
716 48, /* 048 03/00 G0 0 Digit 0 => (self) */
717 49, /* 049 03/01 G0 1 Digit 1 => (self) */
718 50, /* 050 03/02 G0 2 Digit 2 => (self) */
719 51, /* 051 03/03 G0 3 Digit 3 => (self) */
720 52, /* 052 03/04 G0 4 Digit 4 => (self) */
721 53, /* 053 03/05 G0 5 Digit 5 => (self) */
722 54, /* 054 03/06 G0 6 Digit 6 => (self) */
723 55, /* 055 03/07 G0 7 Digit 7 => (self) */
724 56, /* 056 03/08 G0 8 Digit 8 => (self) */
725 57, /* 057 03/09 G0 9 Digit 9 => (self) */
726 58, /* 058 03/10 G0 : Colon => (self) */
727 59, /* 059 03/11 G0 ; Semicolon => (self) */
728 60, /* 060 03/12 G0 < Less-than sign => (self) */
729 61, /* 061 03/13 G0 = Equals sign => (self) */
730 62, /* 062 03/14 G0 > Greater-than sign => (self) */
731 63, /* 063 03/15 G0 ? Question mark => (self) */
732 64, /* 064 04/00 G0 @ Commercial at sign => (self) */
733 65, /* 065 04/01 G0 A Letter A => (self) */
734 66, /* 066 04/02 G0 B Letter B => (self) */
735 67, /* 067 04/03 G0 C Letter C => (self) */
736 68, /* 068 04/04 G0 D Letter D => (self) */
737 69, /* 069 04/05 G0 E Letter E => (self) */
738 70, /* 070 04/06 G0 F Letter F => (self) */
739 71, /* 071 04/07 G0 G Letter G => (self) */
740 72, /* 072 04/08 G0 H Letter H => (self) */
741 73, /* 073 04/09 G0 I Letter I => (self) */
742 74, /* 074 04/10 G0 J Letter J => (self) */
743 75, /* 075 04/11 G0 K Letter K => (self) */
744 76, /* 076 04/12 G0 L Letter L => (self) */
745 77, /* 077 04/13 G0 M Letter M => (self) */
746 78, /* 078 04/14 G0 N Letter N => (self) */
747 79, /* 079 04/15 G0 O Letter O => (self) */
748 80, /* 080 05/00 G0 P Letter P => (self) */
749 81, /* 081 05/01 G0 Q Letter Q => (self) */
750 82, /* 082 05/02 G0 R Letter R => (self) */
751 83, /* 083 05/03 G0 S Letter S => (self) */
752 84, /* 084 05/04 G0 T Letter T => (self) */
753 85, /* 085 05/05 G0 U Letter U => (self) */
754 86, /* 086 05/06 G0 V Letter V => (self) */
755 87, /* 087 05/07 G0 W Letter W => (self) */
756 88, /* 088 05/08 G0 X Letter X => (self) */
757 89, /* 089 05/09 G0 Y Letter Y => (self) */
758 90, /* 090 05/10 G0 Z Letter Z => (self) */
759 91, /* 091 05/11 G0 [ Left square bracket => (self) */
760 92, /* 092 05/12 G0 \ Reverse slash => (self) */
761 93, /* 093 05/13 G0 ] Right square bracket => (self) */
762 94, /* 094 05/14 G0 ^ Circumflex accent => (self) */
763 95, /* 095 05/15 G0 _ Underline, low line => (self) */
764 96, /* 096 06/00 G0 ` Grave accent => (self) */
765 97, /* 097 06/01 G0 a Letter a => (self) */
766 98, /* 098 06/02 G0 b Letter b => (self) */
767 99, /* 099 06/03 G0 c Letter c => (self) */
768 100, /* 100 06/04 G0 d Letter d => (self) */
769 101, /* 101 06/05 G0 e Letter e => (self) */
770 102, /* 102 06/06 G0 f Letter f => (self) */
771 103, /* 103 06/07 G0 g Letter g => (self) */
772 104, /* 104 06/08 G0 h Letter h => (self) */
773 105, /* 105 06/09 G0 i Letter i => (self) */
774 106, /* 106 06/10 G0 j Letter j => (self) */
775 107, /* 107 06/11 G0 k Letter k => (self) */
776 108, /* 108 06/12 G0 l Letter l => (self) */
777 109, /* 109 06/13 G0 m Letter m => (self) */
778 110, /* 110 06/14 G0 n Letter n => (self) */
779 111, /* 111 06/15 G0 o Letter o => (self) */
780 112, /* 112 07/00 G0 p Letter p => (self) */
781 113, /* 113 07/01 G0 q Letter q => (self) */
782 114, /* 114 07/02 G0 r Letter r => (self) */
783 115, /* 115 07/03 G0 s Letter s => (self) */
784 116, /* 116 07/04 G0 t Letter t => (self) */
785 117, /* 117 07/05 G0 u Letter u => (self) */
786 118, /* 118 07/06 G0 v Letter v => (self) */
787 119, /* 119 07/07 G0 w Letter w => (self) */
788 120, /* 120 07/08 G0 x Letter x => (self) */
789 121, /* 121 07/09 G0 y Letter y => (self) */
790 122, /* 122 07/10 G0 z Letter z => (self) */
791 123, /* 123 07/11 G0 { Left curly bracket => (self) */
792 124, /* 124 07/12 G0 | Vertical bar => (self) */
793 125, /* 125 07/13 G0 } Right curly bracket => (self) */
794 126, /* 126 07/14 G0 ~ Tilde => (self) */
795 127, /* 127 07/15 DEL Delete, Rubout => (self) */
796 UNK, /* 128 08/00 C1 => UNK */
797 UNK, /* 129 08/01 C1 => UNK */
798 UNK, /* 130 08/02 C1 => UNK */
799 UNK, /* 131 08/03 C1 => UNK */
800 UNK, /* 132 08/04 C1 IND => UNK */
801 UNK, /* 133 08/05 C1 NEL => UNK */
802 UNK, /* 134 08/06 C1 SSA => UNK */
803 UNK, /* 135 08/07 C1 ESA => UNK */
804 UNK, /* 136 08/08 C1 HTS => UNK */
805 UNK, /* 137 08/09 C1 => UNK */
806 UNK, /* 138 08/10 C1 => UNK */
807 UNK, /* 139 08/11 C1 => UNK */
808 UNK, /* 140 08/12 C1 => UNK */
809 UNK, /* 141 08/13 C1 RI => UNK */
810 UNK, /* 142 08/14 C1 SS2 => UNK */
811 UNK, /* 143 08/15 C1 SS3 => UNK */
812 UNK, /* 144 09/00 C1 DCS => UNK */
813 UNK, /* 145 09/01 C1 => UNK */
814 UNK, /* 146 09/02 C1 => UNK */
815 UNK, /* 147 09/03 C1 STS => UNK */
816 UNK, /* 148 09/04 C1 => UNK */
817 UNK, /* 149 09/05 C1 => UNK */
818 UNK, /* 150 09/06 C1 SPA => UNK */
819 UNK, /* 151 09/07 C1 EPA => UNK */
820 UNK, /* 152 09/08 C1 => UNK */
821 UNK, /* 153 09/09 C1 => UNK */
822 UNK, /* 154 09/10 C1 => UNK */
823 UNK, /* 155 09/11 C1 CSI => UNK */
824 UNK, /* 156 09/12 C1 ST => UNK */
825 UNK, /* 157 09/13 C1 OSC => UNK */
826 UNK, /* 158 09/14 C1 PM => UNK */
827 UNK, /* 159 09/15 C1 APC => UNK */
828 32, /* 160 10/00 G1 No-break space => SP */
829 33, /* 161 10/01 G1 Inverted exclamation => ! */
830 99, /* 162 10/02 G1 Cent sign => c */
831 35, /* 163 10/03 G1 Pound sign => # */
832 36, /* 164 10/04 G1 Currency sign => $ */
833 89, /* 165 10/05 G1 Yen sign => Y */
834 124, /* 166 10/06 G1 Broken bar => | */
835 80, /* 167 10/07 G1 Paragraph sign => P */
836 34, /* 168 10/08 G1 Diaeresis => " */
837 67, /* 169 10/09 G1 Copyright sign => C */
838 97, /* 170 10/10 G1 Feminine ordinal => a */
839 34, /* 171 10/11 G1 Left angle quotation => " */
840 126, /* 172 10/12 G1 Not sign => ~ */
841 45, /* 173 10/13 G1 Soft hyphen => - */
842 82, /* 174 10/14 G1 Registered trade mark => R */
843 95, /* 175 10/15 G1 Macron => _ */
844 111, /* 176 11/00 G1 Degree sign, ring above => o */
845 UNK, /* 177 11/01 G1 Plus-minus sign => UNK */
846 50, /* 178 11/02 G1 Superscript two => 2 */
847 51, /* 179 11/03 G1 Superscript three => 3 */
848 39, /* 180 11/04 G1 Acute accent => ' */
849 117, /* 181 11/05 G1 Micro sign => u */
850 45, /* 182 11/06 G1 Pilcrow sign => - */
851 45, /* 183 11/07 G1 Middle dot => - */
852 44, /* 184 11/08 G1 Cedilla => , */
853 49, /* 185 11/09 G1 Superscript one => 1 */
854 111, /* 186 11/10 G1 Masculine ordinal => o */
855 34, /* 187 11/11 G1 Right angle quotation => " */
856 UNK, /* 188 11/12 G1 One quarter => UNK */
857 UNK, /* 189 11/13 G1 One half => UNK */
858 UNK, /* 190 11/14 G1 Three quarters => UNK */
859 63, /* 191 11/15 G1 Inverted question mark => ? */
860 65, /* 192 12/00 G1 A grave => A */
861 65, /* 193 12/01 G1 A acute => A */
862 65, /* 194 12/02 G1 A circumflex => A */
863 65, /* 195 12/03 G1 A tilde => A */
864 65, /* 196 12/04 G1 A diaeresis => A */
865 65, /* 197 12/05 G1 A ring above => A */
866 65, /* 198 12/06 G1 A with E => A */
867 67, /* 199 12/07 G1 C Cedilla => C */
868 69, /* 200 12/08 G1 E grave => E */
869 69, /* 201 12/09 G1 E acute => E */
870 69, /* 202 12/10 G1 E circumflex => E */
871 69, /* 203 12/11 G1 E diaeresis => E */
872 73, /* 204 12/12 G1 I grave => I */
873 73, /* 205 12/13 G1 I acute => I */
874 73, /* 206 12/14 G1 I circumflex => I */
875 73, /* 207 12/15 G1 I diaeresis => I */
876 68, /* 208 13/00 G1 Icelandic Eth => D */
877 78, /* 209 13/01 G1 N tilde => N */
878 79, /* 210 13/02 G1 O grave => O */
879 79, /* 211 13/03 G1 O acute => O */
880 79, /* 212 13/04 G1 O circumflex => O */
881 79, /* 213 13/05 G1 O tilde => O */
882 79, /* 214 13/06 G1 O diaeresis => O */
883 120, /* 215 13/07 G1 Multiplication sign => x */
884 79, /* 216 13/08 G1 O oblique stroke => O */
885 85, /* 217 13/09 G1 U grave => U */
886 85, /* 218 13/10 G1 U acute => U */
887 85, /* 219 13/11 G1 U circumflex => U */
888 85, /* 220 13/12 G1 U diaeresis => U */
889 89, /* 221 13/13 G1 Y acute => Y */
890 84, /* 222 13/14 G1 Icelandic Thorn => T */
891 115, /* 223 13/15 G1 German sharp s => s */
892 97, /* 224 14/00 G1 a grave => a */
893 97, /* 225 14/01 G1 a acute => a */
894 97, /* 226 14/02 G1 a circumflex => a */
895 97, /* 227 14/03 G1 a tilde => a */
896 97, /* 228 14/04 G1 a diaeresis => a */
897 97, /* 229 14/05 G1 a ring above => a */
898 97, /* 230 14/06 G1 a with e => a */
899 99, /* 231 14/07 G1 c cedilla => c */
900 101, /* 232 14/08 G1 e grave => e */
901 101, /* 233 14/09 G1 e acute => e */
902 101, /* 234 14/10 G1 e circumflex => e */
903 101, /* 235 14/11 G1 e diaeresis => e */
904 105, /* 236 14/12 G1 i grave => i */
905 105, /* 237 14/13 G1 i acute => i */
906 105, /* 238 14/14 G1 i circumflex => i */
907 105, /* 239 14/15 G1 i diaeresis => i */
908 100, /* 240 15/00 G1 Icelandic eth => d */
909 110, /* 241 15/01 G1 n tilde => n */
910 111, /* 242 15/02 G1 o grave => o */
911 111, /* 243 15/03 G1 o acute => o */
912 111, /* 244 15/04 G1 o circumflex => o */
913 111, /* 245 15/05 G1 o tilde => o */
914 111, /* 246 15/06 G1 o diaeresis => o */
915 47, /* 247 15/07 G1 Division sign => / */
916 111, /* 248 15/08 G1 o oblique stroke => o */
917 117, /* 249 15/09 G1 u grave => u */
918 117, /* 250 15/10 G1 u acute => u */
919 117, /* 251 15/11 G1 u circumflex => u */
920 117, /* 252 15/12 G1 u diaeresis => u */
921 121, /* 253 15/13 G1 y acute => y */
922 116, /* 254 15/14 G1 Icelandic thorn => t */
923 121 /* 255 15/15 G1 y diaeresis => y */
927 /* Translation tables for ISO Latin Alphabet 1 to local file character sets */
930 Most of the remaining tables are not annotated like the one above, because
931 the size of the resulting source file would be ridiculous. Each row in the
932 following tables corresponds to a column of ISO 8859-1.
936 yl185[] = { /* ISO 8859-1 Latin Alphabet 1 (Latin-1) to IBM Code Page 850 */
938 This is based on IBM's official invertible translation. Reference: IBM
939 Character Data Representation Architecture (CDRA), Level 1, Registry,
940 SC09-1291-00 (1990), p.152. (Note: Latin-1 is IBM Code Page 00819.) Note:
941 IBM's bizarre rearrangement of C0 controls and DEL has been undone in this
944 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
945 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
946 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
947 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
948 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
949 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
950 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
951 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
952 186, 205, 201, 187, 200, 188, 204, 185, 203, 202, 206, 223, 220, 219, 254, 242,
953 179, 196, 218, 191, 192, 217, 195, 180, 194, 193, 197, 176, 177, 178, 213, 159,
954 255, 173, 189, 156, 207, 190, 221, 245, 249, 184, 166, 174, 170, 240, 169, 238,
955 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168,
956 183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216,
957 209, 165, 227, 224, 226, 229, 153, 158, 157, 235, 233, 234, 154, 237, 232, 225,
958 133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139,
959 208, 164, 149, 162, 147, 228, 148, 246, 155, 151, 163, 150, 129, 236, 231, 152
963 y85l1[] = { /* IBM Code Page 850 to Latin-1 */
965 This is from IBM CDRA page 153. It is the inverse of yl185[].
966 As of edit 183, this table is no longer pure CDRA. The translations
967 involving C0 controls and DEL have been removed.
969 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
970 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
971 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
972 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
973 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
974 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
975 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
976 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
977 199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197,
978 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163, 216, 215, 159,
979 225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187,
980 155, 156, 157, 144, 151, 193, 194, 192, 169, 135, 128, 131, 133, 162, 165, 147,
981 148, 153, 152, 150, 145, 154, 227, 195, 132, 130, 137, 136, 134, 129, 138, 164,
982 240, 208, 202, 203, 200, 158, 205, 206, 207, 149, 146, 141, 140, 166, 204, 139,
983 211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180,
984 173, 177, 143, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 142, 160
989 yl1r8[] = { /* Latin-1 to Hewlett Packard Roman8 */
990 /* This is HP's official translation, straight from iconv */
991 /* It is NOT invertible. */
992 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
993 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
994 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
995 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
996 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
997 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
998 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
999 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1000 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1001 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1002 160, 184, 191, 187, 186, 188, 124, 189, 171, 99, 249, 251, 126, 45, 82, 176,
1003 179, 254, 50, 51, 168, 243, 244, 242, 44, 49, 250, 253, 247, 248, 245, 185,
1004 161, 224, 162, 225, 216, 208, 211, 180, 163, 220, 164, 165, 230, 229, 166, 167,
1005 227, 182, 232, 231, 223, 233, 218, 120, 210, 173, 237, 174, 219, 177, 240, 222,
1006 200, 196, 192, 226, 204, 212, 215, 181, 201, 197, 193, 205, 217, 213, 209, 221,
1007 228, 183, 202, 198, 194, 234, 206, 47, 214, 203, 199, 195, 207, 178, 241, 239
1010 yr8l1[] = { /* Hewlett Packard Roman8 to Latin-1 */
1011 /* This is HP's official translation, straight from iconv */
1012 /* It is NOT invertible. */
1013 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1014 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1015 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1016 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1017 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1018 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1019 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1020 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1021 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1022 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1023 160, 192, 194, 200, 202, 203, 206, 207, 180, 96, 94, 168, 126, 217, 219, 163,
1024 175, 221, 253, 176, 199, 231, 209, 241, 161, 191, 164, 163, 165, 167, 102, 162,
1025 226, 234, 244, 251, 225, 233, 243, 250, 224, 232, 242, 249, 228, 235, 246, 252,
1026 197, 238, 216, 198, 229, 237, 248, 230, 196, 236, 214, 220, 201, 239, 223, 212,
1027 193, 195, 227, 208, 240, 205, 204, 211, 210, 213, 245, 83, 115, 218, 89, 255,
1028 222, 254, 183, 181, 182, 190, 45, 188, 189, 170, 186, 171, 42, 187, 177, 160
1030 #else /* !COMMENT */
1031 /* This is an invertible mapping, approved by HP in January 1994. */
1033 yl1r8[] = { /* ISO Latin-1 to HP Roman8, Invertible */
1034 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1035 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1036 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1037 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1038 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1039 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1040 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1041 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1042 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1043 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1044 160, 184, 191, 187, 186, 188, 169, 189, 171, 170, 249, 251, 172, 175, 190, 176,
1045 179, 254, 235, 236, 168, 243, 244, 242, 238, 246, 250, 253, 247, 248, 245, 185,
1046 161, 224, 162, 225, 216, 208, 211, 180, 163, 220, 164, 165, 230, 229, 166, 167,
1047 227, 182, 232, 231, 223, 233, 218, 252, 210, 173, 237, 174, 219, 177, 240, 222,
1048 200, 196, 192, 226, 204, 212, 215, 181, 201, 197, 193, 205, 217, 213, 209, 221,
1049 228, 183, 202, 198, 194, 234, 206, 255, 214, 203, 199, 195, 207, 178, 241, 239
1053 yr8l1[] = { /* HP Roman8 to ISO Latin-1, Invertible */
1054 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1055 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1056 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1057 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1058 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1059 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1060 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1061 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1062 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1063 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1064 160, 192, 194, 200, 202, 203, 206, 207, 180, 166, 169, 168, 172, 217, 219, 173,
1065 175, 221, 253, 176, 199, 231, 209, 241, 161, 191, 164, 163, 165, 167, 174, 162,
1066 226, 234, 244, 251, 225, 233, 243, 250, 224, 232, 242, 249, 228, 235, 246, 252,
1067 197, 238, 216, 198, 229, 237, 248, 230, 196, 236, 214, 220, 201, 239, 223, 212,
1068 193, 195, 227, 208, 240, 205, 204, 211, 210, 213, 245, 178, 179, 218, 184, 255,
1069 222, 254, 183, 181, 182, 190, 185, 188, 189, 170, 186, 171, 215, 187, 177, 247
1071 #endif /* COMMENT */
1074 yl143[] = { /* Latin-1 to IBM Code Page 437 */
1076 Although the IBM CDRA does not include an official translation between CP437
1077 and ISO Latin Alphabet 1, it does include an official, invertible
1078 translation between CP437 and CP850 (page 196), and another from CP850 to
1079 Latin-1 (CP819) (page 153). This translation was obtained with a two-step
1080 process based on those tables.
1081 As of edit 183, the translation is modified to leave C0 controls alone.
1083 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1084 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1085 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1086 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1087 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1088 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1089 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1090 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1091 186, 205, 201, 187, 200, 188, 204, 185, 203, 202, 206, 223, 220, 219, 254, 242,
1092 179, 196, 218, 191, 192, 217, 195, 180, 194, 193, 197, 176, 177, 178, 213, 159,
1093 255, 173, 155, 156, 207, 157, 221, 245, 249, 184, 166, 174, 170, 240, 169, 238,
1094 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168,
1095 183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216,
1096 209, 165, 227, 224, 226, 229, 153, 158, 190, 235, 233, 234, 154, 237, 232, 225,
1097 133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139,
1098 208, 164, 149, 162, 147, 228, 148, 246, 189, 151, 163, 150, 129, 236, 231, 152
1102 y43l1[] = { /* IBM Code Page 437 to Latin-1 */
1104 This table is the inverse of yl143[].
1106 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1107 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1108 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1109 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1110 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1111 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1112 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1113 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1114 199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197,
1115 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 162, 163, 165, 215, 159,
1116 225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187,
1117 155, 156, 157, 144, 151, 193, 194, 192, 169, 135, 128, 131, 133, 248, 216, 147,
1118 148, 153, 152, 150, 145, 154, 227, 195, 132, 130, 137, 136, 134, 129, 138, 164,
1119 240, 208, 202, 203, 200, 158, 205, 206, 207, 149, 146, 141, 140, 166, 204, 139,
1120 211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180,
1121 173, 177, 143, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 142, 160
1125 yl1aq[] = { /* Latin-1 to Extended Mac Latin (based on Apple QuickDraw) */
1126 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1127 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1128 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1129 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1130 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1131 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1132 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1133 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1134 182, 183, 184, 185, 189, 196, 197, 198, 206, 207, 210, 211, 217, 218, 195, 212,
1135 209, 215, 213, 226, 227, 228, 240, 245, 246, 247, 249, 250, 251, 253, 254, 255,
1136 202, 193, 162, 163, 219, 180, 201, 164, 172, 169, 187, 199, 194, 208, 168, 248,
1137 161, 177, 170, 173, 171, 181, 166, 225, 252, 176, 188, 200, 178, 179, 186, 192,
1138 203, 231, 229, 204, 128, 129, 174, 130, 233, 131, 230, 232, 237, 234, 235, 236,
1139 220, 132, 241, 238, 239, 205, 133, 165, 175, 244, 242, 243, 134, 160, 222, 167,
1140 136, 135, 137, 139, 138, 140, 190, 141, 143, 142, 144, 145, 147, 146, 148, 149,
1141 221, 150, 152, 151, 153, 155, 154, 214, 191, 157, 156, 158, 159, 224, 223, 216
1145 yl1du[] = { /* Latin-1 to Dutch ISO 646 */
1146 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1147 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1148 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1149 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1150 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1151 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1152 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1153 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, 39, 127,
1154 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1155 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1156 32, 33, UNK, 35, 124, UNK, UNK, 93, 123, 67, UNK, 34, UNK, 45, 82, UNK,
1157 91, UNK, UNK, UNK, 126, 117, UNK, UNK, 44, UNK, UNK, 34, 125, 92, 64, 63,
1158 65, 65, 65, 65, 91, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1159 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1160 97, 97, 97, 97, 97, 97, 97, 99, 101, 101, 101, 101, 105, 105, 105, 105,
1161 UNK, 110, 111, 111, 111, 111, 111, 47, 111, 117, 117, 117, 117, 121, UNK, 91
1165 yl1fi[] = { /* Latin-1 to Finnish ISO NRC (*not* ISO 646) */
1166 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1167 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1168 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1169 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1170 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1171 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, UNK, 95,
1172 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1173 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1174 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1175 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1176 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1177 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1178 65, 65, 65, 65, 91, 93, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1179 UNK, 78, 79, 79, 79, 79, 92, 120, 79, 85, 85, 85, 94, 89, UNK, 115,
1180 97, 97, 97, 97, 123, 125, 97, 99, 101, 96, 101, 101, 105, 105, 105, 105,
1181 UNK, 110, 111, 111, 111, 111, 124, 47, 111, 117, 117, 117, 126, 121, UNK, 121
1185 yl1fr[] = { /* Latin-1 to French ISO 646 */
1186 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1187 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1188 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1189 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1190 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1191 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1192 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1193 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1194 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1195 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1196 32, 33, UNK, 35, UNK, UNK, UNK, 93, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1197 91, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1198 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1199 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1200 64, 97, 97, 97, 97, 97, 97, 92, 125, 123, 101, 101, 105, 105, 105, 105,
1201 UNK, 110, 111, 111, 111, 111, 111, 47, 111, 124, 117, 117, 117, 121, UNK, 121
1205 yl1fc[] = { /* Latin-1 to French-Canadian ISO 646 */
1206 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1207 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1208 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1209 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1210 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1211 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, UNK, 95,
1212 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1213 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1214 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1215 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1216 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1217 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1218 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1219 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1220 64, 97, 91, 97, 97, 97, 97, 92, 125, 123, 93, 101, 105, 105, 94, 105,
1221 UNK, 110, 111, 111, 96, 111, 111, 47, 111, 124, 117, 126, 117, 121, UNK, 121
1225 yl1ge[] = { /* Latin-1 to German ISO 646 */
1226 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1227 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1228 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1229 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1230 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1231 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1232 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1233 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1234 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1235 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1236 32, 33, UNK, UNK, UNK, UNK, UNK, 64, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1237 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1238 65, 65, 65, 65, 91, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1239 UNK, 78, 79, 79, 79, 79, 92, 120, 79, 85, 85, 85, 93, 89, UNK, 126,
1240 97, 97, 97, 97, 123, 97, 97, 99, 101, 101, 101, 101, 105, 105, 105, 105,
1241 UNK, 110, 111, 111, 111, 111, 124, 47, 111, 117, 117, 117, 125, 121, UNK, 121
1245 yl1hu[] = { /* Latin-1 to Hungarian ISO-646 */
1246 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1247 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1248 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1249 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1250 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1251 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1252 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1253 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1254 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1255 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1256 32, 33, UNK, UNK, 36, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1257 UNK, 64, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1258 65, 65, 65, 65, 65, 65, 65, 67, 69, 91, 69, 69, 73, 73, 73, 73,
1259 UNK, 78, 79, 79, 79, 79, 92, 120, 79, 85, 85, 85, 93, 89, UNK, 115,
1260 97, 96, 97, 97, 97, 97, 97, 99, 101, 123, 101, 101, 105, 105, 105, 105,
1261 UNK, 110, 111, 111, 111, 111, 124, 47, 111, 117, 117, 117, 125, 121, UNK, 121
1265 yl1it[] = { /* Latin-1 to Italian ISO 646 */
1266 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1267 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1268 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1269 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1270 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1271 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1272 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1273 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1274 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1275 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1276 32, 33, UNK, 35, UNK, UNK, UNK, 64, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1277 91, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1278 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1279 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1280 123, 97, 97, 97, 97, 97, 97, 92, 125, 93, 101, 101, 126, 105, 105, 105,
1281 UNK, 110, 124, 111, 111, 111, 111, 47, 111, 96, 117, 117, 117, 121, UNK, 121
1285 yl1ne[] = { /* Latin-1 to NeXT */
1286 /* NEED TO MAKE THIS ONE INVERTIBLE, LIKE CP850 */
1288 Which means finding all the graphic characters in the NeXT set that have
1289 no equivalent in Latin-1 and assigning them to the UNK positions (mostly
1290 Latin-1 C1 controls). Then make the ynel1[] table be the inverse of this
1291 one. But first we should try to get an official Latin-1/NeXT translation
1292 table from NeXT, Inc.
1294 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1295 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1296 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1297 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1298 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1299 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1300 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1301 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1302 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1303 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1304 32, 161, 162, 163, 168, 165, 181, 167, 200, 160, 227, 171, 190, UNK, 176, 197,
1305 202, 209, 201, 204, 194, 157, 182, 183, 203, 192, 235, 187, 210, 211, 212, 191,
1306 129, 130, 131, 132, 133, 134, 225, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1307 144, 145, 146, 147, 148, 149, 150, 158, 233, 151, 152, 153, 154, 155, 156, 251,
1308 213, 214, 215, 216, 217, 218, 241, 219, 220, 221, 222, 223, 224, 226, 228, 229,
1309 230, 231, 236, 237, 238, 239, 240, 159, 249, 242, 243, 244, 246, 247, 252, 253
1313 yl1no[] = { /* Latin-1 to Norwegian/Danish ISO 646 */
1314 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1315 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1316 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1317 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1318 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1319 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1320 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1321 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, 126, 127,
1322 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1323 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1324 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1325 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1326 65, 65, 65, 65, 65, 93, 91, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1327 UNK, 78, 79, 79, 79, 79, 79, 120, 92, 85, 85, 85, 85, 89, UNK, 115,
1328 97, 97, 97, 97, 97, 125, 123, 99, 101, 101, 101, 101, 105, 105, 105, 105,
1329 UNK, 110, 111, 111, 111, 111, 111, 47, 124, 117, 117, 117, 117, 121, UNK, 121
1333 yl1po[] = { /* Latin-1 to Portuguese ISO 646 */
1334 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1335 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1336 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1337 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1338 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1339 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1340 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1341 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, 126, 127,
1342 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1343 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1344 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1345 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1346 65, 65, 65, 91, 65, 65, 65, 92, 69, 69, 69, 69, 73, 73, 73, 73,
1347 UNK, 78, 79, 79, 79, 93, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1348 97, 97, 97, 123, 97, 97, 97, 124, 101, 101, 101, 101, 105, 105, 105, 105,
1349 UNK, 110, 111, 111, 111, 125, 111, 47, 111, 117, 117, 117, 117, 121, UNK, 121
1353 yl1sp[] = { /* Latin-1 to Spanish ISO 646 */
1354 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1355 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1356 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1357 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1358 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1359 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1360 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1361 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 96, UNK, UNK, 126, 127,
1362 126, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1363 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1364 32, 91, UNK, 35, UNK, UNK, UNK, 64, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1365 123, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 93,
1366 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1367 UNK, 92, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1368 124, 97, 97, 97, 97, 97, 97, 125, 101, 101, 101, 101, 105, 105, 105, 105,
1369 UNK, 124, 111, 111, 111, 111, 111, 47, 111, 117, 117, 117, 117, 121, UNK, 121
1373 yl1sw[] = { /* Latin-1 to Swedish ISO 646 */
1374 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1375 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1376 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1377 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1378 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1379 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, UNK, 95,
1380 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1381 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1382 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1383 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1384 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1385 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1386 65, 65, 65, 65, 91, 93, 65, 67, 69, 64, 69, 69, 73, 73, 73, 73,
1387 UNK, 78, 79, 79, 79, 79, 92, 120, 79, 85, 85, 85, 94, 89, UNK, 115,
1388 97, 97, 97, 97, 123, 125, 97, 99, 101, 96, 101, 101, 105, 105, 105, 105,
1389 UNK, 110, 111, 111, 111, 111, 124, 47, 111, 117, 117, 117, 126, 121, UNK, 121
1393 yl1ch[] = { /* Latin-1 to Swiss ISO 646 */
1394 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1395 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1396 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1397 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1398 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1399 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, UNK, UNK,
1400 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1401 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1402 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1403 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1404 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1405 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1406 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1407 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1408 64, 97, 97, 97, 123, 97, 97, 92, 95, 91, 93, 101, 105, 105, 94, 105,
1409 UNK, 110, 111, 111, 96, 111, 124, 47, 111, 35, 117, 126, 125, 121, UNK, 121
1413 yl1dm[] = { /* Latin-1 to DEC Multinational Character Set */
1414 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1415 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1416 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1417 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1418 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1419 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1420 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1421 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1422 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1423 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1424 32, 161, 162, 163, 168, 165, 124, 167, 34, 169, 170, 171, 126, UNK, 82, UNK,
1425 176, 177, 178, 179, 39, 181, 182, 183, 44, 185, 186, 187, 188, 189, UNK, 191,
1426 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1427 UNK, 209, 210, 211, 212, 213, 214, 120, 216, 217, 218, 219, 220, 221, UNK, 223,
1428 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1429 UNK, 241, 242, 243, 244, 245, 246, 47, 248, 249, 250, 251, 252, UNK, UNK, 253
1433 yl1dg[] = { /* Latin-1 to Data General International Character Set */
1434 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1435 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1436 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1437 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1438 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1439 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1440 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1441 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1442 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1443 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1444 160, 171, 167, 168, 166, 181, 191, 187, 189, 173, 169, 177, 161, 255, 174, 175,
1445 188, 182, 164, 165, 190, 163, 178, 185, 186, 179, 170, 176, 223, 162, 220, 172,
1446 193, 192, 194, 196, 195, 197, 198, 199, 201, 200, 202, 203, 205, 204, 206, 207,
1447 184, 208, 210, 209, 211, 213, 212, 215, 214, 217, 216, 218, 219, 221, 222, 252,
1448 225, 224, 226, 228, 227, 229, 230, 231, 233, 232, 234, 235, 237, 236, 238, 239,
1449 183, 240, 242, 241, 243, 245, 244, 247, 246, 249, 248, 250, 251, 180, 254, 253
1453 /* Local file character sets to ISO Latin Alphabet 1 */
1457 yasl1[] = { /* ASCII to Latin-1 */
1458 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1459 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1460 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1461 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1462 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1463 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1464 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1465 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127
1467 #endif /* NOTUSED */
1470 yaql1[] = { /* Extended Mac Latin (based on Apple Quickdraw) to Latin-1 */
1471 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1472 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1473 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1474 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1475 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1476 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1477 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1478 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1479 196, 197, 199, 201, 209, 214, 220, 225, 224, 226, 228, 227, 229, 231, 233, 232,
1480 234, 235, 237, 236, 238, 239, 241, 243, 242, 244, 246, 245, 250, 249, 251, 252,
1481 221, 176, 162, 163, 167, 215, 182, 223, 174, 169, 178, 180, 168, 179, 198, 216,
1482 185, 177, 188, 189, 165, 181, 128, 129, 130, 131, 190, 170, 186, 132, 230, 248,
1483 191, 161, 172, 142, 133, 134, 135, 171, 187, 166, 160, 192, 195, 213, 136, 137,
1484 173, 144, 138, 139, 143, 146, 247, 145, 255, 140, 141, 164, 208, 240, 222, 254,
1485 253, 183, 147, 148, 149, 194, 202, 193, 203, 200, 205, 206, 207, 204, 211, 212,
1486 150, 210, 218, 219, 217, 151, 152, 153, 175, 154, 155, 156, 184, 157, 158, 159
1490 ydul1[] = { /* Dutch ISO 646 to Latin-1 */
1491 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1492 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1493 32, 33, 34, 163, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1494 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1495 190, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1496 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 255, 189, 124, 94, 95,
1497 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1498 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 168, 164, 188, 39, 127
1502 yfil1[] = { /* Finnish NRC (*not* ISO-646) to Latin-1 */
1503 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1504 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1505 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1506 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1507 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1508 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 196, 214, 197, 220, 95,
1509 233, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1510 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246, 229, 252, 127
1514 yfrl1[] = { /* French ISO 646 to Latin-1 */
1515 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1516 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1517 32, 33, 34, 163, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1518 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1519 224, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1520 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 176, 231, 167, 94, 95,
1521 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1522 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 233, 249, 232, 168, 127
1526 yfcl1[] = { /* French-Canadian ISO 646 to Latin-1 */
1527 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1528 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1529 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1530 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1531 224, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1532 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 226, 231, 234, 238, 95,
1533 244, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1534 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 233, 249, 232, 251, 127
1538 ygel1[] = { /* German ISO 646 to Latin-1 */
1539 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1540 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1541 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1542 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1543 167, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1544 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 196, 214, 220, 94, 95,
1545 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1546 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246, 252, 223, 127
1550 yitl1[] = { /* Italian ISO 646 to Latin-1 */
1551 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1552 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1553 32, 33, 34, 163, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1554 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1555 167, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1556 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 176, 231, 233, 94, 95,
1557 249, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1558 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 224, 242, 232, 236, 127
1562 ynel1[] = { /* NeXT to Latin-1 */
1563 /* NEED TO MAKE THIS ONE INVERTIBLE */
1564 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1565 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1566 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1567 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1568 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1569 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1570 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1571 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1572 160, 192, 193, 194, 195, 196, 197, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1573 208, 209, 210, 211, 212, 213, 214, 217, 218, 219, 220, 221, 222, 181, 215, 247,
1574 169, 161, 162, 163, UNK, 165, UNK, 167, 164, UNK, UNK, 171, UNK, UNK, UNK, UNK,
1575 174, UNK, UNK, UNK, 183, 166, 182, UNK, UNK, UNK, UNK, 187, UNK, UNK, 172, 191,
1576 185, 96, 180, 94, 126, 175, UNK, UNK, 168, 178, 176, 184, 179, UNK, UNK, UNK,
1577 UNK, 177, 188, 189, 190, 224, 225, 226, 227, 228, 229, 231, 232, 233, 234, 235,
1578 236, 198, 237, 170, 238, 239, 240, 241, UNK, 216, UNK, 186, 242, 243, 244, 245,
1579 246, 230, 249, 250, 251, UNK, 252, 253, UNK, 248, UNK, 223, 254, 255, UNK, UNK
1583 ynol1[] = { /* Norwegian/Danish ISO 646 to Latin-1 */
1584 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1585 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1586 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1587 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1588 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1589 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 198, 216, 197, 94, 95,
1590 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1591 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 230, 248, 229, 126, 127
1595 ypol1[] = { /* Portuguese ISO 646 to Latin-1 */
1596 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1597 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1598 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1599 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1600 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1601 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 195, 199, 213, 94, 95,
1602 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1603 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 227, 231, 245, 126, 127
1607 yspl1[] = { /* Spanish ISO 646 to Latin-1 */
1608 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1609 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1610 32, 33, 34, 163, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1611 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1612 167, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1613 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 161, 209, 191, 94, 95,
1614 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1615 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 176, 241, 231, 126, 127
1619 yswl1[] = { /* Swedish ISO 646 to Latin-1 */
1620 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1621 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1622 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1623 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1624 201, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1625 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 196, 214, 197, 220, 95,
1626 233, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1627 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246, 229, 252, 127
1631 ychl1[] = { /* Swiss ISO 646 to Latin-1 */
1632 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1633 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1634 32, 33, 34, 249, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1635 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1636 224, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1637 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 233, 231, 234, 238, 232,
1638 244, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1639 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246, 252, 251, 127
1643 yhul1[] = { /* Hungarian ISO 646 to Latin-1 */
1644 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1645 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1646 32, 33, 34, 35, 164, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1647 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1648 193, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1649 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 201, 214, 220, 94, 95,
1650 225, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1651 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 233, 246, 252, 34, 127
1655 ydml1[] = { /* DEC Multinational Character Set to Latin-1 */
1656 /* Note: This is a null translation */
1657 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1658 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1659 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1660 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1661 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1662 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1663 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1664 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1665 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1666 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1667 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
1668 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1669 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1670 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1671 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1672 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
1676 ydgl1[] = { /* Data General International to Latin-1 */
1677 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1678 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1679 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1680 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1681 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1682 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1683 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1684 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1685 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1686 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1687 160, 172, 189, 181, 178, 179, 164, 162, 163, 170, 186, 161, 191, 169, 174, 175,
1688 187, 171, 182, 185, 253, 165, 177, 240, 208, 183, 184, 167, 176, 168, 180, 166,
1689 193, 192, 194, 196, 195, 197, 198, 199, 201, 200, 202, 203, 205, 204, 206, 207,
1690 209, 211, 210, 212, 214, 213, 216, 215, 218, 217, 219, 220, 190, 221, 222, 188,
1691 225, 224, 226, 228, 227, 229, 230, 231, 233, 232, 234, 235, 237, 236, 238, 239,
1692 241, 243, 242, 244, 246, 245, 248, 247, 250, 249, 251, 252, 223, 255, 254, 173
1696 /* Translation tables for Cyrillic character sets */
1700 ylcac[] = { /* Latin/Cyrillic to CP866 */
1701 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1702 16, 17, 18, 19, 208, 209, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1703 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1704 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1705 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1706 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1707 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1708 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1709 196, 179, 192, 217, 191, 218, 195, 193, 180, 194, 197, 176, 177, 178, 211, 216,
1710 205, 186, 200, 188, 187, 201, 204, 202, 185, 203, 206, 223, 220, 219, 254, UNK,
1711 255, 240, 132, 131, 242, 83, 73, 244, 74, 139, 141, 151, 138, 45, 246, 135,
1712 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1713 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1714 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
1715 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1716 252, 241, 164, 163, 243, 115, 105, 245, 106, 171, 173, 231, 170, 21, 247, 167
1720 ylc55[] = { /* Latin/Cyrillic to CP855 (inverse of y55lc) */
1721 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1722 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1723 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1724 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1725 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1726 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1727 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1728 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1729 174, 175, 176, 177, 178, 179, 180, 185, 186, 187, 188, 191, 192, 193, 194, 195,
1730 196, 197, 200, 201, 202, 203, 204, 205, 206, 207, 217, 218, 219, 220, 223, 254,
1731 255, 133, 129, 131, 135, 137, 139, 141, 143, 145, 147, 149, 151, 240, 153, 155,
1732 161, 163, 236, 173, 167, 169, 234, 244, 184, 190, 199, 209, 211, 213, 215, 221,
1733 226, 228, 230, 232, 171, 182, 165, 252, 246, 250, 159, 242, 238, 248, 157, 224,
1734 160, 162, 235, 172, 166, 168, 233, 243, 183, 189, 198, 208, 210, 212, 214, 216,
1735 225, 227, 229, 231, 170, 181, 164, 251, 245, 249, 158, 241, 237, 247, 156, 222,
1736 239, 132, 128, 130, 134, 136, 138, 140, 142, 144, 146, 148, 150, 253, 152, 154
1740 ylc1251[] = { /* Latin/Cyrillic to CP1251 (inverse of y1251lc) */
1741 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1742 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1743 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1744 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1745 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1746 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1747 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1748 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1749 130, 132, 133, 134, 135, 136, 137, 139, 145, 146, 147, 148, 149, 150, 151, 152,
1750 153, 155, 164, 165, 166, 169, 171, 172, 174, 176, 177, 180, 181, 182, 183, 187,
1751 160, 168, 128, 129, 170, 189, 178, 175, 163, 138, 140, 142, 141, 173, 161, 143,
1752 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1753 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1754 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1755 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
1756 185, 184, 144, 131, 186, 190, 179, 191, 188, 154, 156, 158, 157, 167, 162, 159
1760 ylcbu[] = { /* Latin/Cyrillic to Bulgarian PC Code Page */
1761 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1762 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1763 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1764 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1765 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1766 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1767 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1768 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1769 255, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
1770 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1771 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1772 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
1773 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1774 213, 207, 208, 209, 210, 211, 212, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1775 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1776 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 214, 253, 254
1780 ylck8[] = { /* Latin/Cyrillic to Old KOI-8 Cyrillic */
1781 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1782 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1783 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1784 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1785 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1786 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1787 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1788 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1789 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1790 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1791 UNK, 229, UNK, UNK, UNK, 83, 73, 73, 74, UNK, UNK, UNK, 235, UNK, 245, UNK,
1792 225, 226, 247, 231, 228, 229, 246, 250, 233, 234, 235, 236, 237, 238, 239, 240,
1793 242, 243, 244, 245, 230, 232, 227, 254, 251, 253, 255, 249, 248, 252, 224, 241,
1794 193, 194, 215, 199, 196, 197, 214, 218, 201, 202, 203, 204, 205, 206, 207, 208,
1795 210, 211, 212, 213, 198, 200, 195, 222, 219, 221, 223, 217, 216, 220, 192, 209,
1796 UNK, 197, UNK, UNK, UNK, 115, 105, 105, 106, UNK, UNK, UNK, 203, UNK, 213, UNK
1800 yaclc[] = { /* CP866 to Latin/Cyrillic */
1801 /* NEED TO MAKE THIS ONE INVERTIBLE */
1802 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1803 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1804 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1805 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1806 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1807 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1808 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1809 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1810 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1811 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1812 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1813 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1814 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1815 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1816 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1817 161, 241, 164, 244, 167, 247, 174, 254, UNK, UNK, UNK, UNK, 240, UNK, UNK, UNK
1821 y55lc[] = { /* CP855 to Latin/Cyrillic (inverse of ylc55) */
1822 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1823 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1824 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1825 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1826 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1827 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1828 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1829 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1830 242, 162, 243, 163, 241, 161, 244, 164, 245, 165, 246, 166, 247, 167, 248, 168,
1831 249, 169, 250, 170, 251, 171, 252, 172, 254, 174, 255, 175, 238, 206, 234, 202,
1832 208, 176, 209, 177, 230, 198, 212, 180, 213, 181, 228, 196, 211, 179, 128, 129,
1833 130, 131, 132, 133, 134, 229, 197, 216, 184, 135, 136, 137, 138, 217, 185, 139,
1834 140, 141, 142, 143, 144, 145, 218, 186, 146, 147, 148, 149, 150, 151, 152, 153,
1835 219, 187, 220, 188, 221, 189, 222, 190, 223, 154, 155, 156, 157, 191, 239, 158,
1836 207, 224, 192, 225, 193, 226, 194, 227, 195, 214, 182, 210, 178, 236, 204, 240,
1837 173, 235, 203, 215, 183, 232, 200, 237, 205, 233, 201, 231, 199, 253, 159, 160
1841 y1251lc[] = { /* CP1251 to Latin/Cyrillic (inverse of ylc1251) */
1842 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1843 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1844 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1845 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1846 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1847 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1848 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1849 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1850 162, 163, 128, 243, 129, 130, 131, 132, 133, 134, 169, 135, 170, 172, 171, 175,
1851 242, 136, 137, 138, 139, 140, 141, 142, 143, 144, 249, 145, 250, 252, 251, 255,
1852 160, 174, 254, 168, 146, 147, 148, 253, 161, 149, 164, 150, 151, 173, 152, 167,
1853 153, 154, 166, 246, 155, 156, 157, 158, 241, 240, 244, 159, 248, 165, 245, 247,
1854 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1855 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1856 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1857 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239
1861 ybulc[] = { /* Bulgarian PC Code Page to Latin/Cyrillic */
1862 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1863 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1864 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1865 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1866 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1867 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1868 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1869 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1870 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1871 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
1872 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1873 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1874 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 209,
1875 210, 211, 212, 213, 214, 208, 253, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1876 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1877 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 254, 255, 128
1881 yk8lc[] = { /* Old KOI-8 Cyrillic to Latin/Cyrillic */
1882 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1883 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1884 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1885 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1886 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1887 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1888 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1889 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1890 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1891 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1892 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1893 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1894 238, 208, 209, 230, 212, 213, 228, 211, 229, 216, 217, 218, 219, 220, 221, 222,
1895 223, 239, 224, 225, 226, 227, 214, 210, 236, 235, 215, 232, 237, 233, 231, 234,
1896 206, 176, 177, 198, 180, 181, 196, 179, 197, 184, 185, 186, 187, 188, 189, 190,
1897 191, 207, 192, 193, 194, 195, 182, 178, 204, 203, 183, 200, 205, 201, 199, 127
1901 ylcsk[] = { /* Latin/Cyrillic to Short KOI */
1902 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1903 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1904 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1905 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1906 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1907 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1908 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1909 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 127,
1910 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1911 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1912 32, 101, UNK, UNK, UNK, 83, 73, 73, 74, UNK, UNK, UNK, 107, 45, 117, UNK,
1913 97, 98, 119, 103, 100, 101, 118, 122, 105, 106, 107, 108, 109, 110, 111, 112,
1914 114, 115, 116, 117, 102, 104, 99, 126, 123, 125, 39, 121, 120, 124, 96, 113,
1915 97, 98, 119, 103, 100, 101, 118, 122, 105, 106, 107, 108, 109, 110, 111, 112,
1916 114, 115, 116, 117, 102, 104, 99, 126, 123, 125, 39, 121, 120, 124, 96, 113,
1917 UNK, 101, UNK, UNK, UNK, 83, 73, 73, 74, UNK, UNK, UNK, 107, UNK, 117, UNK
1920 CONST CHAR yskcy[] = { /* Short KOI to Latin/Cyrillic */
1921 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1922 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1923 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1924 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1925 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1926 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1927 206, 176, 177, 198, 180, 181, 196, 179, 197, 184, 185, 186, 187, 188, 189, 190,
1928 191, 207, 192, 193, 194, 195, 182, 178, 204, 203, 183, 200, 205, 201, 199, 127
1930 #endif /* CYRILLIC */
1934 /* Latin-2 tables */
1937 yl252[] = { /* Latin-2 to Code Page 852 */
1938 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1939 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1940 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1941 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1942 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1943 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1944 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1945 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1946 174, 175, 176, 177, 178, 179, 180, 185, 186, 187, 188, 191, 192, 193, 194, 195,
1947 196, 197, 200, 201, 202, 203, 204, 205, 206, 217, 218, 219, 220, 223, 240, 254,
1948 255, 164, 244, 157, 207, 149, 151, 245, 249, 230, 184, 155, 141, 170, 166, 189,
1949 248, 165, 242, 136, 239, 150, 152, 243, 247, 231, 173, 156, 171, 241, 167, 190,
1950 232, 181, 182, 198, 142, 145, 143, 128, 172, 144, 168, 211, 183, 214, 215, 210,
1951 209, 227, 213, 224, 226, 138, 153, 158, 252, 222, 233, 235, 154, 237, 221, 225,
1952 234, 160, 131, 199, 132, 146, 134, 135, 159, 130, 169, 137, 216, 161, 140, 212,
1953 208, 228, 229, 162, 147, 139, 148, 246, 253, 133, 163, 251, 129, 236, 238, 250
1957 y52l2[] = { /* Code Page 852 to Latin-2 */
1958 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1959 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1960 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1961 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1962 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1963 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1964 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1965 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1966 199, 252, 233, 226, 228, 249, 230, 231, 179, 235, 213, 245, 238, 172, 196, 198,
1967 201, 197, 229, 244, 246, 165, 181, 166, 182, 214, 220, 171, 187, 163, 215, 232,
1968 225, 237, 243, 250, 161, 177, 174, 190, 202, 234, 173, 188, 200, 186, 128, 129,
1969 130, 131, 132, 133, 134, 193, 194, 204, 170, 135, 136, 137, 138, 175, 191, 139,
1970 140, 141, 142, 143, 144, 145, 195, 227, 146, 147, 148, 149, 150, 151, 152, 164,
1971 240, 208, 207, 203, 239, 210, 205, 206, 236, 153, 154, 155, 156, 222, 217, 157,
1972 211, 223, 212, 209, 241, 242, 169, 185, 192, 218, 224, 219, 253, 221, 254, 180,
1973 158, 189, 178, 183, 162, 167, 247, 184, 176, 168, 255, 251, 216, 248, 159, 160
1977 yl21250[] = { /* Latin-2 to Code Page 1250 */
1978 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1979 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1980 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1981 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1982 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1983 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1984 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1985 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1986 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 144, 145, 146, 147, 148,
1987 149, 150, 151, 152, 153, 155, 166, 169, 171, 172, 174, 177, 181, 182, 183, 187,
1988 160, 165, 162, 163, 164, 188, 140, 167, 168, 138, 170, 141, 143, 173, 142, 175,
1989 176, 185, 178, 179, 180, 190, 156, 161, 184, 154, 186, 157, 159, 189, 158, 191,
1990 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1991 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1992 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1993 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
1997 y1250l2[] = { /* Code Page 1250 to Latin-2 */
1998 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1999 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2000 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2001 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2002 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2003 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2004 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2005 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2006 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 169, 138, 166, 171, 174, 172,
2007 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 185, 149, 182, 187, 190, 188,
2008 160, 183, 162, 163, 164, 161, 150, 167, 168, 151, 170, 152, 153, 173, 154, 175,
2009 176, 155, 178, 179, 180, 156, 157, 158, 184, 177, 186, 159, 165, 189, 181, 191,
2010 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
2011 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
2012 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
2013 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
2017 yl2mz[] = { /* Latin-2 to Mazovia (NOT invertible) */
2018 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2019 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2020 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2021 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2022 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2023 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2024 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2025 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2026 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2027 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2028 255, 143, UNK, 156, 155, 76, 152, 21, 34, 83, 83, 84, 160, 45, 90, 161,
2029 248, 134, 44, 146, 39, 108, 158, UNK, 44, 115, 115, 116, 166, 34, 122, 167,
2030 82, 65, 65, 65, 142, 76, 149, 128, 67, 69, 144, 69, 69, 73, 73, 68,
2031 68, 165, 78, 163, 79, 153, 153, 250, 82, 85, 85, 154, 154, 89, 84, 225,
2032 114, 97, 131, 97, 132, 108, 141, 135, 99, 130, 145, 137, 101, 105, 140, 101,
2033 100, 164, 110, 162, 147, 148, 148, 246, 114, 117, 117, 129, 129, 121, 116, 249
2037 ymzl2[] = { /* Mazovia to Latin-2 (NOT INVERTIBLE) */
2038 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2039 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2040 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2041 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2042 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2043 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2044 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2045 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2046 128, 252, 233, 226, 228, 97, 177, 231, 101, 235, 101, 105, 238, 230, 196, 161,
2047 202, 234, 179, 244, 246, 198, 117, 117, 166, 214, 220, 164, 163, 89, 182, 102,
2048 172, 175, 243, 211, 242, 210, 188, 191, 63, UNK, UNK, UNK, UNK, 33, 34, 34,
2049 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2050 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2051 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2052 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2053 UNK, UNK, UNK, UNK, UNK, UNK, 247, UNK, 176, 255, 215, UNK, UNK, UNK, UNK, 160
2057 yl2l1[] = { /* Latin-2 to Latin-1 */
2058 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2059 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2060 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2061 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2062 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2063 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2064 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2065 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2066 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2067 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2068 160, 'A', UNK, 'L', 164, 'L', 'S', 167, 168, 'S', 'S', 'T', 'Z', 173, 'Z', 'Z',
2069 176, 'a', UNK, 'l', 180, 'l', 's', UNK, 184, 's', 's', 't', 'z', UNK, 'z', 'z',
2070 'R', 193, 194, 'A', 196, 'L', 'C', 199, 'C', 201, 'E', 203, 'E', 205, 'I', 'D',
2071 208, 'N', 'N', 211, 212, 'O', 214, 215, 'R', 'U', 218, 'U', 220, 221, 'T', 223,
2072 'r', 225, 226, 'a', 228, 'l', 'c', 231, 'c', 233, 'e', 235, 'e', 237, 'i', 'd',
2073 240, 'n', 'n', 243, 244, 'o', 246, 247, 'r', 'u', 250, 'u', 252, 253, 't', '.'
2077 yl1l2[] = { /* Latin-1 to Latin-2 */
2078 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2079 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2080 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2081 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2082 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2083 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2084 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2085 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2086 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2087 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2088 160, 'A', UNK, 'L', 164, UNK, UNK, 167, 168, 'C', 'a', '<', '>', 173, 'R', UNK,
2089 176, UNK, UNK, UNK, 180, UNK, UNK, UNK, 184, UNK, 'o', '>', UNK, UNK, UNK, UNK,
2090 'A', 193, 194, 'A', 196, 'A', 'A', 199, 'E', 201, 'E', 203, 'I', 205, 'I', 'I',
2091 208, 'N', 'O', 211, 212, 'O', 214, 215, 'O', 'U', 218, 'U', 220, 221, UNK, 223,
2092 'a', 225, 226, 'a', 228, 'a', 'a', 231, 'e', 233, 'e', 235, 'i', 237, 'i', 'i',
2093 240, 'n', 'o', 243, 244, 'o', 246, 247, 'o', 'u', 250, 'u', 252, 253, UNK, 'y'
2097 yl2as[] = { /* Latin-2 to ASCII */
2098 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2099 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2100 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2101 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2102 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2103 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2104 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2105 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2106 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2107 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2108 32, 'A', UNK, 'L', UNK, 'L', 'S', UNK, 34, 'S', 'S', 'T', 'Z', '-', 'Z', 'Z',
2109 UNK, 'a', UNK, 'l', 39, 'l', 's', UNK, 44, 's', 's', 't', 'z', UNK, 'z', 'z',
2110 'R', 'A', 'A', 'A', 'A', 'L', 'C', 'C', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'D',
2111 'D', 'N', 'N', 'O', 'O', 'O', 'O', 'x', 'R', 'U', 'U', 'U', 'U', 'Y', 'T', 's',
2112 'r', 'a', 'a', 'a', 'a', 'l', 'c', 'c', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'd',
2113 'd', 'n', 'n', 'o', 'o', 'o', 'o', '/', 'r', 'u', 'u', 'u', 'u', 'y', 't', '.'
2119 8-bit Tables providing invertible translation between Latin/Hebrew and CP862.
2122 y62lh[] = { /* PC Code Page 862 to ISO 8859-8 Latin/Hebrew */
2123 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2124 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2125 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2126 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2127 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2128 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2129 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2130 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2131 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
2132 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 162, 163, 165, 128, 129,
2133 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 172, 189, 188, 140, 171, 187,
2134 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
2135 157, 158, 159, 161, 164, 166, 167, 168, 169, 170, 173, 174, 175, 223, 179, 180,
2136 182, 184, 185, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
2137 203, 204, 205, 206, 207, 208, 181, 209, 210, 211, 212, 213, 214, 215, 216, 217,
2138 218, 177, 219, 220, 221, 222, 186, 251, 176, 183, 252, 253, 254, 178, 255, 160
2142 ylh62[] = { /* ISO 8859-8 Latin/Hebrew to PC Code Page 862 */
2143 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2144 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2145 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2146 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2147 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2148 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2149 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2150 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2151 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 173, 176, 177, 178,
2152 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
2153 255, 195, 155, 156, 196, 157, 197, 198, 199, 200, 201, 174, 170, 202, 203, 204,
2154 248, 241, 253, 206, 207, 230, 208, 249, 209, 210, 246, 175, 172, 171, 211, 212,
2155 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
2156 229, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, 205,
2157 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2158 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 247, 250, 251, 252, 254
2161 7-bit table providing readable translation from DEC Hebrew-7 to CP862.
2165 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2166 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2167 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2168 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2169 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2170 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2171 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2172 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127
2175 8-bit table providing readable translation from CP862 to Hebrew-7.
2178 y62h7[] = { /* PC Code Page 862 to Hebrew-7 */
2179 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2180 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2181 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2182 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2183 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2184 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2185 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2186 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127,
2187 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2188 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, UNK,
2189 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2190 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2191 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2192 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2193 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2194 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK
2197 7-bit table providing readable translation from Hebrew-7 to ISO Latin/Hebrew.
2201 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2202 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2203 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2204 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2205 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2206 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2207 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
2208 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 123, 124, 125, 126, 127
2211 8-bit table providing readable translation from ISO Latin/Hebrew to Hebrew-7.
2214 ylhh7[] = { /* Latin/Hebrew to Hebrew-7 */
2215 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2216 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2217 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2218 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2219 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2220 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2221 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2222 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127,
2223 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2224 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2225 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2226 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2227 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2228 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2229 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2230 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, UNK
2236 8-bit Tables providing invertible translation between Latin/Greek and CP869.
2239 ylg69[] = { /* ISO 8859-7 Latin/Greek to PC Code Page 869 */
2240 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2241 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2242 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2243 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2244 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2245 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2246 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2247 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2248 135, 147, 148, 176, 177, 178, 179, 180, 185, 186, 187, 188, 191, 192, 193, 194,
2249 195, 196, 197, 200, 201, 202, 203, 204, 205, 206, 217, 218, 219, 220, 223, 254,
2250 255, 139, 140, 156, 128, 129, 138, 245, 249, 151, 130, 174, 137, 240, 131, 142,
2251 248, 241, 153, 154, 239, 247, 134, 136, 141, 143, 144, 175, 146, 171, 149, 152,
2252 161, 164, 165, 166, 167, 168, 169, 170, 172, 173, 181, 182, 183, 184, 189, 190,
2253 198, 199, 132, 207, 208, 209, 210, 211, 212, 213, 145, 150, 155, 157, 158, 159,
2254 252, 214, 215, 216, 221, 222, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
2255 234, 235, 237, 236, 238, 242, 243, 244, 246, 250, 160, 251, 162, 163, 253, 133
2259 y69lg[] = { /* PC Code Page 869 to ISO 8859-7 Latin/Greek */
2260 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2261 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2262 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2263 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2264 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2265 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2266 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2267 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2268 164, 165, 170, 174, 210, 255, 182, 128, 183, 172, 166, 161, 162, 184, 175, 185,
2269 186, 218, 188, 129, 130, 190, 219, 169, 191, 178, 179, 220, 163, 221, 222, 223,
2270 250, 192, 252, 253, 193, 194, 195, 196, 197, 198, 199, 189, 200, 201, 171, 187,
2271 131, 132, 133, 134, 135, 202, 203, 204, 205, 136, 137, 138, 139, 206, 207, 140,
2272 141, 142, 143, 144, 145, 146, 208, 209, 147, 148, 149, 150, 151, 152, 153, 211,
2273 212, 213, 214, 215, 216, 217, 225, 226, 227, 154, 155, 156, 157, 228, 229, 158,
2274 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 243, 242, 244, 180,
2275 173, 177, 245, 246, 247, 167, 248, 181, 176, 168, 249, 251, 224, 254, 159, 160
2278 7-bit table providing readable translation from ELOT 927 to CP869.
2282 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2283 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2284 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2285 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2286 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2287 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2288 96, 164, 165, 166, 167, 168, 169, 170, 172, 173, 181, 182, 183, 184, 189, 190,
2289 198, 199, 207, 208, 209, 210, 211, 212, 213, 32, 32, 23, 124, 125, 126, 127
2292 8-bit table providing readable translation from CP869 to ELOT 927.
2295 y69eg[] = { /* PC Code Page 869 to ELOT 927 */
2296 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2297 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2298 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2299 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2300 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2301 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2302 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2303 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127,
2304 UNK, UNK, UNK, UNK, UNK, UNK, 97, UNK, 46, UNK, 124, 39, 39, 101, 45, 103,
2305 105, 105, 111, UNK, UNK, 116, 116, UNK, 120, 50, 51, 97, UNK, 101, 103, 105,
2306 105, 105, 111, 116, 97, 98, 99, 100, 101, 102, 103, UNK, 104, 105, 34, 34,
2307 UNK, UNK, UNK, UNK, UNK, 106, 107, 108, 109, UNK, UNK, UNK, UNK, 110, 111, UNK,
2308 UNK, UNK, UNK, UNK, UNK, UNK, 112, 113, UNK, UNK, UNK, UNK, UNK, UNK, UNK, 114,
2309 115, 116, 117, 118, 119, 120, 97, 98, 99, UNK, UNK, UNK, UNK, 100, 101, UNK,
2310 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 39,
2311 45, UNK, 116, 117, 118, UNK, 119, UNK, UNK, UNK, 120, 116, 116, 120, UNK, 32
2315 7-bit table providing readable translation from ELOT 927 to ISO Latin/Greek.
2319 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2320 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2321 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2322 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2323 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2324 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2325 96, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
2326 208, 209, 211, 212, 213, 214, 215, 216, 217, 32, 32, 123, 124, 125, 126, 127
2329 8-bit table providing readable translation from ISO Latin/Greek to ELOT 927.
2332 ylgeg[] = { /* Latin/Greek to ELOT 927 */
2333 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2334 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2335 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2336 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2337 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2338 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2339 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2340 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127,
2341 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2342 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2343 32, 39, 39, UNK, UNK, UNK, 124, UNK, 34, UNK, UNK, 34, UNK, 45, UNK, 45,
2344 UNK, UNK, 50, 51, 39, UNK, 97, 46, 101, 103, 105, 34, 111, UNK, 116, 120,
2345 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2346 112, 113, UNK, 114, 115, 116, 117, 118, 119, 120, 105, 116, 97, 101, 103, 105,
2347 116, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2348 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 105, 116, 111, 116, 120, UNK
2352 /* Translation functions ... */
2354 CHAR /* The identity function... */
2356 ident(CHAR c) /* (no longer used) */
2359 #endif /* CK_ANSIC */
2361 return(c); /* Instead, enter NULL in the */
2362 } /* table of functions to avoid */
2363 /* needless function calls. */
2370 #endif /* CK_ANSIC */
2372 return((c < 128) ? c : '?');
2380 #endif /* CK_ANSIC */
2382 return((c < 160) ? c : '?');
2391 #endif /* CK_ANSIC */
2392 { /* xl1as */ /* Latin-1 to US ASCII... */
2393 switch(langs[language].id) {
2396 if (c == 255) { /* Dutch umlaut-y */
2397 zmstuff('j'); /* becomes ij */
2399 } else return(yl1as[c]); /* all others by the book */
2402 switch (c) { /* German, special rules. */
2403 case 196: /* umlaut-A -> Ae */
2406 case 214: /* umlaut-O -> Oe */
2409 case 220: /* umlaut-U -> Ue */
2412 case 228: /* umlaut-a -> ae */
2415 case 246: /* umlaut-o -> oe */
2418 case 252: /* umlaut-u -> ue */
2421 case 223: /* ess-zet -> ss */
2424 default: return(yl1as[c]); /* all others by the book */
2430 switch (c) { /* Scandanavian languages. */
2431 case 196: /* umlaut-A -> Ae */
2432 case 198: /* AE ligature also -> Ae */
2435 case 214: /* umlaut-O -> Oe */
2436 case 216: /* O-slash -> Oe */
2439 case 220: /* umlaut-U -> Ue */
2440 /* return('Y'); replaced by "Ue" by popular demand. */
2441 /* Y for Umlaut-U is only used in German names. */
2444 case 228: /* umlaut-a -> ae */
2445 case 230: /* ditto for ae ligature */
2448 case 246: /* umlaut-o -> oe */
2449 case 248: /* o-slash -> oe */
2452 case 252: /* umlaut-u -> ue */
2453 /* return('y'); replaced by "ue" by popular demand. */
2456 case 197: /* A-ring -> Aa */
2459 case 229: /* a-ring -> aa */
2462 default: return(yl1as[c]); /* All others by the book */
2464 case L_ICELANDIC: /* Icelandic. */
2466 case 198: /* uppercase AE -> AE */
2469 case 208: /* uppercase Eth -> D */
2471 case 214: /* uppercase O-diaeresis -> Oe */
2474 case 222: /* uppercase Thorn -> Th */
2477 case 230: /* lowercase ae -> ae */
2480 case 240: /* lowercase Eth -> d */
2482 case 246: /* lowercase O-diaeresis -> oe */
2485 case 254: /* lowercase Thorn -> th */
2488 default: return(yl1as[c]); /* All others by the book */
2491 return(yl1as[c]); /* None of the above, by the table. */
2495 CHAR /* CP1252 to ASCII */
2500 #endif /* CK_ANSIC */
2502 switch(c) { /* Microsoft name... */
2503 case 0x80: return('?'); /* Euro Sign */
2504 case 0x82: return('\047'); /* Single Low-9 Quotation Mark */
2505 case 0x83: return('f'); /* Latin Small Letter f with Hook */
2506 case 0x84: return('"'); /* Double low-9 Quotation Mark */
2507 case 0x85: return('-'); /* Horizontal Ellipsis */
2508 case 0x86: return('+'); /* Dagger */
2509 case 0x87: return('+'); /* Double Dagger */
2510 case 0x88: return('^'); /* Modifier Letter Circumflex Accent */
2511 case 0x89: return('?'); /* Per Mille Sign */
2512 case 0x8A: return('S'); /* Latin Capital Letter S with Caron */
2513 case 0x8B: return('<'); /* Single Left Angle Quotation Mark */
2514 case 0x8C: return('O'); /* Latin Capital Ligature OE */
2515 case 0x8E: return('Z'); /* Latin Capital Letter Z with Caron */
2516 case 0x91: return('\047'); /* Left Single Quotation Mark */
2517 case 0x92: return('\047'); /* Right Single Quotation Mark */
2518 case 0x93: return('"'); /* Left Double Quotation Mark */
2519 case 0x94: return('"'); /* Right Double Quotation Mark */
2520 case 0x95: return('.'); /* Bullet */
2521 case 0x96: return('-'); /* En Dash */
2522 case 0x97: return('-'); /* Em Dash */
2523 case 0x98: return('~'); /* Small Tilde */
2524 case 0x99: return('T'); /* Trade Mark Sign */
2525 case 0x9A: return('s'); /* Latin Small Letter s with Caron */
2526 case 0x9B: return('>'); /* Single Right Angle Quotation Mark */
2527 case 0x9C: return('o'); /* Latin Small Ligature OE */
2528 case 0x9E: return('z'); /* Latin Small Letter z with Caron */
2529 case 0x9F: return('Y'); /* Latin Capital Letter Y Diaeresis */
2531 if (c > 0x80 && c < 0xa0)
2538 CHAR /* CP1252 to Latin-1 */
2543 #endif /* CK_ANSIC */
2545 if (c == 0x95) return(0xb7); /* Middle dot */
2546 return((c < 160) ? xw1as(c) : c);
2549 CHAR /* Latin-1 to German */
2554 #endif /* CK_ANSIC */
2559 CHAR /* German to Latin-1 */
2564 #endif /* CK_ANSIC */
2576 #endif /* CK_ANSIC */
2577 { /* xgeas */ /* German ISO 646 to ASCII */
2581 case 91: /* umlaut-A -> Ae */
2584 case 92: /* umlaut-O -> Oe */
2587 case 93: /* umlaut-U -> Ue */
2590 case 123: /* umlaut-a -> ae */
2593 case 124: /* umlaut-o -> oe */
2596 case 125: /* umlaut-u -> ue */
2599 case 126: /* ess-zet -> ss */
2602 default: return(c); /* all others stay the same */
2611 #endif /* CK_ANSIC */
2612 { /* xl1w1 */ /* Latin-1 to CP1252 (Windows L1) */
2613 if (c > 127 && c < 160)
2624 #endif /* CK_ANSIC */
2625 { /* xduas */ /* Dutch ISO 646 to US ASCII */
2629 case 64: return(UNK); /* 3/4 */
2630 case 91: /* y-diaeresis */
2633 case 92: return(UNK); /* 1/2 */
2634 case 93: return(124); /* vertical bar */
2635 case 123: return(34); /* diaeresis */
2636 case 124: return(UNK); /* Florin */
2637 case 125: return(UNK); /* 1/4 */
2638 case 126: return(39); /* Apostrophe */
2648 #endif /* CK_ANSIC */
2649 { /* xfias */ /* Finnish ISO 646 to US ASCII */
2653 case 91: /* A-diaeresis */
2656 case 92: /* O-diaeresis */
2659 case 93: /* A-ring */
2662 case 94: /* U-diaeresis */
2666 case 96: /* e-acute */
2668 case 123: /* a-diaeresis */
2671 case 124: /* o-diaeresis */
2674 case 125: /* a-ring */
2677 case 126: /* u-diaeresis */
2691 #endif /* CK_ANSIC */
2692 { /* xfras */ /* French ISO 646 to US ASCII */
2696 case 64: return(97); /* a grave */
2697 case 91: return(UNK); /* degree sign */
2698 case 92: return(99); /* c cedilla */
2699 case 93: return(UNK); /* paragraph sign */
2700 case 123: return(101); /* e acute */
2701 case 124: return(117); /* u grave */
2702 case 125: return(101); /* e grave */
2703 case 126: return(34); /* diaeresis */
2713 #endif /* CK_ANSIC */
2714 { /* xfcas */ /* French Canadian ISO 646 to ASCII */
2718 case 64: return('a'); /* a grave */
2719 case 91: return('a'); /* a circumflex */
2720 case 92: return('c'); /* c cedilla */
2721 case 93: return('e'); /* e circumflex */
2722 case 94: return('i'); /* i circumflex */
2723 case 96: return('o'); /* o circumflex */
2724 case 123: return('e'); /* e acute */
2725 case 124: return('u'); /* u grave */
2726 case 125: return('e'); /* e grave */
2727 case 126: return('u'); /* u circumflex */
2737 #endif /* CK_ANSIC */
2738 { /* xitas */ /* Italian ISO 646 to ASCII */
2742 case 91: return(UNK); /* degree */
2743 case 92: return('c'); /* c cedilla */
2744 case 93: return('e'); /* e acute */
2745 case 96: return('u'); /* u grave */
2746 case 123: return('a'); /* a grave */
2747 case 124: return('o'); /* o grave */
2748 case 125: return('e'); /* e grave */
2749 case 126: return('i'); /* i grave */
2759 #endif /* CK_ANSIC */
2760 { /* xneas */ /* NeXT to ASCII */
2761 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
2762 if (c == 234) { /* handle OE digraph. */
2765 } else if (c == 250) { /* Also lowercase oe. */
2770 c = xnel1(c); /* Convert to Latin-1 */
2771 return(yl1as[c]); /* Convert Latin-1 to ASCII */
2779 #endif /* CK_ANSIC */
2780 { /* xnoas */ /* Norge/Danish ISO 646 to ASCII */
2785 zmstuff('E'); /* AE digraph */
2787 case 92: return('O'); /* O slash */
2788 case 93: /* A ring */
2791 case 123: /* ae digraph */
2794 case 124: return('o'); /* o slash */
2795 case 125: /* a ring */
2807 #endif /* CK_ANSIC */
2808 { /* xpoas */ /* Portuguese ISO 646 to ASCII */
2812 case 91: return('A'); /* A tilde */
2813 case 92: return('C'); /* C cedilla */
2814 case 93: return('O'); /* O tilde */
2815 case 123: return('a'); /* a tilde */
2816 case 124: return('c'); /* c cedilla */
2817 case 125: return('o'); /* o tilde */
2827 #endif /* CK_ANSIC */
2828 { /* xspas */ /* Spanish ISO 646 to ASCII */
2832 case 91: return(33); /* Inverted exclamation */
2833 case 92: return('N'); /* N tilde */
2834 case 93: return(63); /* Inverted question mark */
2835 case 123: return(UNK); /* degree */
2836 case 124: return('n'); /* n tilde */
2837 case 125: return('c'); /* c cedilla */
2847 #endif /* CK_ANSIC */
2848 { /* xswas */ /* Swedish ISO 646 to ASCII */
2852 case 64: return('E'); /* E acute */
2853 case 91: /* A diaeresis */
2856 case 92: /* O diaeresis */
2859 case 93: /* A ring */
2862 case 94: /* U diaeresis */
2866 case 96: return('e'); /* e acute */
2867 case 123: /* a diaeresis */
2870 case 124: /* o diaeresis */
2873 case 125: /* a ring */
2876 case 126: /* u diaeresis */
2889 #endif /* CK_ANSIC */
2890 { /* xchas */ /* Swiss ISO 646 to ASCII */
2894 case 35: return('u'); /* u grave */
2895 case 64: return('a'); /* a grave */
2896 case 91: return('e'); /* e acute */
2897 case 92: return('c'); /* c cedilla */
2898 case 93: return('e'); /* e circumflex */
2899 case 94: return('i'); /* i circumflex */
2900 case 95: return('e'); /* e grave */
2901 case 96: return('o'); /* o circumflex */
2902 case 123: /* a diaeresis */
2905 case 124: /* o diaeresis */
2908 case 125: /* u diaeresis */
2911 case 126: return('u'); /* u circumflex */
2921 #endif /* CK_ANSIC */
2922 { /* xhuas */ /* Hungarian ISO 646 to ASCII */
2926 case 64: return('A'); /* A acute */
2927 case 91: return('E'); /* E acute */
2928 case 92: return('O'); /* O diaeresis */
2929 case 93: return('U'); /* U diaeresis */
2930 case 96: return('a'); /* a acute */
2931 case 123: return('e'); /* e acute */
2932 case 124: return('o'); /* o acute */
2933 case 125: return('u'); /* u acute */
2934 case 126: return(34); /* double acute accent */
2944 #endif /* CK_ANSIC */
2945 { /* xdmas */ /* DEC MCS to ASCII */
2946 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
2947 if (c == 215) { /* handle OE digraph. */
2950 } else if (c == 247) { /* Also lowercase oe. */
2955 return(yl1as[c]); /* Otherwise treat like Latin-1 */
2963 #endif /* CK_ANSIC */
2964 { /* xdgas */ /* Data General to ASCII */
2966 case 180: return('f'); /* Florin */
2967 case 183: return('<'); /* Less-equal */
2968 case 184: return('>'); /* Greater-equal */
2969 case 186: return(96); /* Grave accent */
2970 case 191: return('^'); /* Uparrow */
2972 if (langs[language].id == L_FRENCH) { /* OE digraph */
2977 if (langs[language].id == L_FRENCH) { /* oe digraph */
2981 case 175: case 179: case 220: case 222:
2982 case 223: case 254: case 255:
2984 default: /* The rest, convert to Latin-1 */
2985 return(yl1as[ydgl1[c]]); /* and from there to ASCII */
2994 #endif /* CK_ANSIC */
2995 { /* xr8as */ /* Hewlett Packard Roman8 to ASCII */
2997 case 175: return('L'); /* Lira */
2998 case 190: return('f'); /* Florin */
2999 case 235: return('S'); /* S caron */
3000 case 236: return('s'); /* s caron */
3001 case 246: return('-'); /* Horizontal bar */
3002 case 252: return('*'); /* Solid box */
3003 default: /* The rest, convert to Latin-1 */
3004 return(yl1as[yr8l1[c]]); /* and from there to ASCII */
3013 #endif /* CK_ANSIC */
3014 { /* xukl1 */ /* UK ASCII to Latin-1 */
3027 #endif /* CK_ANSIC */
3028 { /* xl1uk */ /* Latin-1 to UK ASCII */
3031 else return(yl1as[c]);
3034 CHAR /* Latin-1 to French ISO 646 */
3039 #endif /* CK_ANSIC */
3045 CHAR /* French ISO 646 to Latin-1 */
3050 #endif /* CK_ANSIC */
3057 CHAR /* Latin-1 to Dutch ASCII */
3062 #endif /* CK_ANSIC */
3072 #endif /* CK_ANSIC */
3073 { /* xdul1 */ /* Dutch ISO 646 to Latin-1 */
3084 #endif /* CK_ANSIC */
3085 { /* xfil1 */ /* Finnish ISO 646 to Latin-1 */
3096 #endif /* CK_ANSIC */
3097 { /* xl1fi */ /* Latin-1 to Finnish ISO 646 */
3106 #endif /* CK_ANSIC */
3107 { /* xfcl1 */ /* French Canadian ISO646 to Latin-1 */
3118 #endif /* CK_ANSIC */
3119 { /* xl1fc */ /* Latin-1 to French Canadian ISO646 */
3128 #endif /* CK_ANSIC */
3129 { /* xitl1 */ /* Italian ISO 646 to Latin-1 */
3140 #endif /* CK_ANSIC */
3141 { /* xl1it */ /* Latin-1 to Italian ISO 646 */
3150 #endif /* CK_ANSIC */
3151 { /* xnel1 */ /* NeXT to Latin-1 */
3152 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3153 if (c == 234) { /* handle OE digraph. */
3156 } else if (c == 250) { /* Also lowercase oe. */
3169 #endif /* CK_ANSIC */
3170 { /* xnel9 */ /* NeXT to Latin-9 */
3172 case 234: return(188); /* OE */
3173 case 250: return(189); /* oe */
3174 case 188: return(234); /* keep it invertible... */
3175 case 189: return(250); /* oe */
3186 #endif /* CK_ANSIC */
3187 { /* xl1ne */ /* Latin-1 to NeXT */
3196 #endif /* CK_ANSIC */
3197 { /* xl9ne */ /* Latin-9 to NeXT */
3199 case 188: return(234); /* OE */
3200 case 189: return(250); /* oe */
3201 case 234: return(188); /* OE */
3202 case 250: return(189); /* oe */
3213 #endif /* CK_ANSIC */
3214 { /* xnol1 */ /* Norway/Denmark ISO 646 to Latin-1 */
3225 #endif /* CK_ANSIC */
3226 { /* xl1no */ /* Latin-1 to Norway/Denmark ISO 646 */
3235 #endif /* CK_ANSIC */
3236 { /* xpol1 */ /* Portuguese ISO 646 to Latin-1 */
3247 #endif /* CK_ANSIC */
3248 { /* xl1po */ /* Latin-1 to Portuguese ISO 646 */
3257 #endif /* CK_ANSIC */
3258 { /* xspl1 */ /* Spanish ISO 646 to Latin-1 */
3269 #endif /* CK_ANSIC */
3270 { /* xl1sp */ /* Latin-1 to Spanish ISO 646 */
3279 #endif /* CK_ANSIC */
3280 { /* xswl1 */ /* Swedish ISO 646 to Latin-1 */
3291 #endif /* CK_ANSIC */
3292 { /* xl1sw */ /* Latin-1 to Swedish ISO 646 */
3301 #endif /* CK_ANSIC */
3302 { /* xchl1 */ /* Swiss ISO 646 to Latin-1 */
3313 #endif /* CK_ANSIC */
3314 { /* xl1ch */ /* Latin-1 to Swiss ISO 646 */
3323 #endif /* CK_ANSIC */
3324 { /* xhul1 */ /* Hungarian ISO 646 to Latin-1 */
3335 #endif /* CK_ANSIC */
3336 { /* xl1hu */ /* Latin-1 to Hungarian ISO 646 */
3345 #endif /* CK_ANSIC */
3346 { /* xl1dm */ /* Latin-1 to DEC MCS */
3355 #endif /* CK_ANSIC */
3356 { /* xl9dm */ /* Latin-9 to DEC MCS */
3358 case 188: return(215);
3359 case 189: return(247);
3360 case 215: return(188);
3361 case 247: return(189);
3372 #endif /* CK_ANSIC */
3373 { /* xl9w1 */ /* Latin-9 to CP1252 */
3379 case 0xa4: return(0x80); /* Euro */
3380 case 0xa6: return(0x8a); /* S-caron */
3381 case 0xa8: return(0x9a); /* s-caron */
3382 case 0xb4: return(0x8e); /* Z-caron */
3383 case 0xb8: return(0x9e); /* z-caron */
3384 case 0xbc: return(0x8c); /* OE */
3385 case 0xbd: return(0x9c); /* oe */
3386 case 0xbe: return(0x9f); /* Y-diaeresis */
3397 #endif /* CK_ANSIC */
3398 { /* xl1dg */ /* Latin-1 to DG ICS */
3407 #endif /* CK_ANSIC */
3408 { /* xdml1 */ /* DEC MCS to Latin-1 */
3409 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3410 if (c == 215) { /* handle OE digraph. */
3413 } else if (c == 247) { /* Also lowercase oe. */
3426 #endif /* CK_ANSIC */
3427 { /* xdml9 */ /* DEC MCS to Latin-9 */
3429 case 215: return(188); /* OE */
3430 case 247: return(189); /* oe */
3431 case 188: return(215); /* and swap the other two... */
3432 case 189: return(247); /* (1/4 and 1/2) */
3433 default: /* to keep it invertible */
3443 #endif /* CK_ANSIC */
3444 { /* xdgl1 */ /* DG International CS to Latin-1 */
3445 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3446 if (c == 215) { /* handle OE digraph. */
3449 } else if (c == 247) { /* Also lowercase oe. */
3462 #endif /* CK_ANSIC */
3463 { /* xr8l1 */ /* Hewlett Packard Roman8 to Latin-1 */
3472 #endif /* CK_ANSIC */
3473 { /* xl1r8 */ /* Latin-1 to Hewlett Packard Roman8 */
3477 /* Translation functions for receiving files and translating them into ASCII */
3484 #endif /* CK_ANSIC */
3486 switch(langs[language].id) {
3489 if (c == 255) { /* Dutch umlaut-y */
3490 zdstuff('j'); /* becomes ij */
3492 } else return(yl1as[c]); /* all others by the book */
3495 switch (c) { /* German, special rules. */
3496 case 196: /* umlaut-A -> Ae */
3499 case 214: /* umlaut-O -> Oe */
3502 case 220: /* umlaut-U -> Ue */
3505 case 228: /* umlaut-a -> ae */
3508 case 246: /* umlaut-o -> oe */
3511 case 252: /* umlaut-u -> ue */
3514 case 223: /* ess-zet -> ss */
3517 default: return(yl1as[c]); /* all others by the book */
3523 switch (c) { /* Scandanavian languages. */
3524 case 196: /* umlaut-A -> Ae */
3527 case 214: /* umlaut-O -> Oe */
3528 case 216: /* O-slash -> Oe */
3531 case 220: /* umlaut-U -> Y */
3535 case 228: /* umlaut-a -> ae */
3538 case 246: /* umlaut-o -> oe */
3539 case 248: /* o-slash -> oe */
3542 case 252: /* umlaut-u -> y */
3546 case 197: /* A-ring -> Aa */
3549 case 229: /* a-ring -> aa */
3552 default: return(yl1as[c]); /* All others by the book */
3555 return(yl1as[c]); /* No language, go by the table. */
3559 CHAR /* IBM CP437 to Latin-1 */
3564 #endif /* CK_ANSIC */
3569 CHAR /* IBM CP850 to Latin-1 */
3574 #endif /* CK_ANSIC */
3579 CHAR /* Latin-1 to IBM CP437 */
3584 #endif /* CK_ANSIC */
3589 CHAR /* Latin-1 to CP850 */
3594 #endif /* CK_ANSIC */
3604 #endif /* CK_ANSIC */
3605 { /* x43as */ /* CP437 to ASCII */
3606 c = y43l1[c]; /* Translate to Latin-1 */
3607 return(xl143(c)); /* and from Latin-1 to ASCII. */
3615 #endif /* CK_ANSIC */
3616 { /* x85as */ /* CP850 to ASCII */
3617 c = y85l1[c]; /* Translate to Latin-1 */
3618 return(xl1as(c)); /* and from Latin-1 to ASCII. */
3621 CHAR /* Macintosh Latin to Latin-1 */
3626 #endif /* CK_ANSIC */
3628 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3629 if (c == 206) { /* handle OE digraph. */
3632 } else if (c == 207) { /* Also lowercase oe. */
3640 CHAR /* Macintosh Latin to ASCII */
3645 #endif /* CK_ANSIC */
3647 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3648 if (c == 206) { /* handle OE digraph. */
3651 } else if (c == 207) { /* Also lowercase oe. */
3656 c = yaql1[c]; /* Translate to Latin-1 */
3657 return(xl1as(c)); /* then to ASCII. */
3660 CHAR /* Latin-1 to Macintosh Latin */
3665 #endif /* CK_ANSIC */
3672 /* Translation functions for Latin Alphabet 2 */
3674 CHAR /* Latin-2 to Latin-1 */
3679 #endif /* CK_ANSIC */
3689 #endif /* CK_ANSIC */
3690 { /* xl2w1 */ /* Latin-2 to CP1252 (Windows L1) */
3691 if (c > 127 && c < 160)
3697 CHAR /* Latin-1 to Latin-2 */
3702 #endif /* CK_ANSIC */
3707 CHAR /* CP1252 to Latin-1 */
3712 #endif /* CK_ANSIC */
3715 case 0x8a: return(0xa9); /* S caron */
3716 case 0x8e: return(0xae); /* Z caron */
3717 case 0x9a: return(0xb9); /* s caron */
3718 case 0x9e: return(0xbe); /* z caron */
3720 return((c < 160) ? xw1as(c) : xl1l2(c));
3725 CHAR /* Latin-2 to ASCII */
3730 #endif /* CK_ANSIC */
3735 CHAR /* Latin-2 to CP852 */
3740 #endif /* CK_ANSIC */
3745 CHAR /* Latin-2 to Mazovia */
3750 #endif /* CK_ANSIC */
3755 CHAR /* Latin-1 to Mazovia */
3760 #endif /* CK_ANSIC */
3762 return(yl2mz[yl1l2[c]]);
3765 CHAR /* Mazovia to Latin-1 */
3770 #endif /* CK_ANSIC */
3772 return(yl2l1[ymzl2[c]]);
3775 CHAR /* Mazovia to Latin-9 */
3780 #endif /* CK_ANSIC */
3782 return(xl2l9(ymzl2[c]));
3785 CHAR /* CP852 to Latin-2 */
3790 #endif /* CK_ANSIC */
3795 CHAR /* Mazovia to Latin-2 */
3800 #endif /* CK_ANSIC */
3805 CHAR /* Latin-2 to CP1250 */
3810 #endif /* CK_ANSIC */
3815 CHAR /* CP1250 to Latin-2 */
3820 #endif /* CK_ANSIC */
3825 CHAR /* CP852 to ASCII */
3830 #endif /* CK_ANSIC */
3832 return(yl2as[y52l2[c]]); /* CP852 -> Latin-2 -> ASCII */
3835 CHAR /* CP1250 to ASCII */
3840 #endif /* CK_ANSIC */
3842 return(yl2as[y1250l2[c]]); /* CP81250 -> Latin-2 -> ASCII */
3846 CHAR /* CP852 to Latin-1 */
3851 #endif /* CK_ANSIC */
3853 return(yl2l1[y52l2[c]]); /* CP852 -> Latin-2 -> Latin-1 */
3856 CHAR /* CP1250 to Latin-1 */
3861 #endif /* CK_ANSIC */
3863 return(yl2l1[y1250l2[c]]); /* CP1250 -> Latin-2 -> Latin-1 */
3866 CHAR /* CP1250 to Latin-9 */
3871 #endif /* CK_ANSIC */
3873 if (c == (CHAR)128) /* Euro */
3876 return(xl2l9(y1250l2[c])); /* CP1250 -> Latin-2 -> Latin-9 */
3879 CHAR /* Latin-1 to CP852 */
3884 #endif /* CK_ANSIC */
3886 return(yl252[yl1l2[c]]); /* Latin-1 -> Latin-2 -> CP852 */
3889 CHAR /* Latin-1 to CP1250 */
3894 #endif /* CK_ANSIC */
3896 return(yl21250[yl1l2[c]]); /* Latin-1 -> Latin-2 -> CP1250 */
3899 CHAR /* Latin-9 to CP1250 */
3904 #endif /* CK_ANSIC */
3906 if (c == (CHAR)164) /* Euro */
3909 return(yl21250[xl9l2(c)]); /* Latin-9 -> Latin-2 -> CP1250 */
3912 CHAR /* Latin-9 to Mazovia */
3917 #endif /* CK_ANSIC */
3919 return(yl2mz[xl9l2(c)]); /* Latin-9 -> Latin-2 -> Mazovia */
3922 CHAR /* Latin-9 to Mazovia */
3927 #endif /* CK_ANSIC */
3929 return(yl2as[xmzl2(c)]); /* Mazovia -> Latin-2 -> ASCII */
3932 CHAR /* Latin-2 to NeXT */
3937 #endif /* CK_ANSIC */
3940 case 162: return(198); /* Breve */
3941 case 163: return(232); /* L with stroke */
3942 case 178: return(206); /* Ogonek */
3943 case 179: return(248); /* l with stroke */
3944 case 183: return(207); /* Caron */
3945 case 189: return(205); /* Double acute */
3946 case 208: return(144); /* D stroke = Eth */
3947 case 240: return(230); /* d stroke = eth */
3948 case 255: return(199); /* Dot above */
3949 default: return(yl1ne[yl2l1[c]]);
3953 CHAR /* Latin-2 to CP437 */
3958 #endif /* CK_ANSIC */
3960 return(yl1l2[y43l1[c]]);
3963 CHAR /* Latin-2 to CP850 */
3968 #endif /* CK_ANSIC */
3970 return(yl1l2[y85l1[c]]);
3973 CHAR /* Latin-2 to Apple */
3978 #endif /* CK_ANSIC */
3980 return(yl1aq[yl2l1[c]]); /* Could do more... */
3983 CHAR /* Latin-2 to DGI */
3988 #endif /* CK_ANSIC */
3990 return(ydgl1[yl1l2[c]]);
3993 CHAR /* Latin-2 to Short KOI */
3998 #endif /* CK_ANSIC */
4000 return(islower(c) ? toupper(c) : c);
4003 CHAR /* NeXT to Latin-2 */
4008 #endif /* CK_ANSIC */
4011 case 144: return(208); /* D stroke = Eth */
4012 case 198: return(162); /* Breve */
4013 case 199: return(255); /* Dot above */
4014 case 205: return(189); /* Double acute */
4015 case 206: return(178); /* Ogonek */
4016 case 207: return(183); /* Caron */
4017 case 230: return(240); /* d stroke = eth */
4018 case 232: return(163); /* L with stroke */
4019 case 248: return(179); /* l with stroke */
4020 default: return(yl1l2[ynel1[c]]); /* Others, go thru Latin-1 */
4024 CHAR /* CP437 to Latin-2 */
4029 #endif /* CK_ANSIC */
4031 return(yl1l2[y43l1[c]]);
4034 CHAR /* CP850 to Latin-2 */
4039 #endif /* CK_ANSIC */
4041 return(yl1l2[y85l1[c]]);
4044 CHAR /* Apple to Latin-2 */
4049 #endif /* CK_ANSIC */
4052 case 249: return(162); /* Breve accent */
4053 case 250: return(255); /* Dot accent */
4054 case 253: return(189); /* Double acute */
4055 default: return(yl1l2[yaql1[c]]);
4059 CHAR /* DGI to Latin-2 */
4064 #endif /* CK_ANSIC */
4066 return(yl1l2[ydgl1[c]]); /* (for now) */
4069 CHAR /* Short KOI to Latin-2 */
4074 #endif /* CK_ANSIC */
4076 return(islower(c) ? toupper(c) : c);
4079 CHAR /* Latin-2 to German */
4084 #endif /* CK_ANSIC */
4087 case 167: return(64); /* Paragraph sign */
4088 case 196: return(91); /* A-diaeresis */
4089 case 214: return(92); /* O-diaeresis */
4090 case 220: return(93); /* U-diaeresis */
4091 case 223: return(126); /* double-s */
4092 case 228: return(123); /* a-diaeresis */
4093 case 246: return(124); /* o-diaeresis */
4094 case 252: return(125); /* u-diaeresis */
4095 default: return(yl2as[c]); /* Others */
4099 CHAR /* German to Latin-2 */
4104 #endif /* CK_ANSIC */
4109 case 64: return(167); /* Paragraph sign */
4110 case 91: return(196); /* A-diaeresis */
4111 case 92: return(214); /* O-diaeresis */
4112 case 93: return(220); /* U-diaeresis */
4113 case 123: return(228); /* a-diaeresis */
4114 case 126: return(223); /* double-s */
4115 case 124: return(246); /* o-diaeresis */
4116 case 125: return(252); /* u-diaeresis */
4117 default: return(c); /* Others */
4121 CHAR /* Latin-2 to Hungarian */
4126 #endif /* CK_ANSIC */
4129 case 164: return(36); /* Currency symbol */
4130 case 189: return(126); /* Double acute accent */
4131 case 193: return(64); /* A-acute */
4132 case 201: return(91); /* E-acute */
4133 case 214: return(92); /* O-diaeresis */
4134 case 220: return(93); /* U-diaeresis */
4135 case 225: return(96); /* a-acute */
4136 case 233: return(123); /* e-acute */
4137 case 246: return(124); /* o-diaeresis */
4138 case 252: return(125); /* u-diaeresis */
4139 default: return(yl2as[c]); /* Others */
4143 CHAR /* Hungarian to Latin-2 */
4148 #endif /* CK_ANSIC */
4153 case 36: return(164); /* Currency symbol */
4154 case 64: return(193); /* A-acute */
4155 case 91: return(201); /* E-acute */
4156 case 92: return(214); /* O-diaeresis */
4157 case 93: return(220); /* U-diaeresis */
4158 case 96: return(225); /* a-acute */
4159 case 123: return(233); /* e-acute */
4160 case 124: return(246); /* o-diaeresis */
4161 case 125: return(252); /* u-diaeresis */
4162 case 126: return(189); /* Double acute accent */
4163 default: return(c); /* Others */
4172 #endif /* CK_ANSIC */
4173 { /* xr8l2 */ /* Hewlett Packard Roman8 to Latin-2 */
4175 case 235: return(169); /* S caron */
4176 case 236: return(185); /* s caron */
4177 default: return(yl1l2[yr8l1[c]]);
4186 #endif /* CK_ANSIC */
4187 { /* xl2r8 */ /* Latin-2 to Hewlett Packard Roman8 Character Set */
4189 case 169: return(235); /* S caron */
4190 case 185: return(236); /* s caron */
4191 default: return(yr8l1[yl1l2[c]]);
4195 #else /* NOLATIN2 */
4205 #define xl11250 NULL
4206 #define xl21250 NULL
4207 #define xl91250 NULL
4209 #define x1250as NULL
4210 #define x1250l1 NULL
4211 #define x1250l2 NULL
4212 #define x1250l9 NULL
4244 /* This one can also be used for ELOT 927, Hebrew 7, etc */
4251 #endif /* CK_ANSIC */
4252 { /* xassk */ /* ASCII to Short KOI */
4255 return((c > 95) ? (c - 32) : c); /* Fold columns 6-7 to 4-5 */
4259 /* Translation functions for Cyrillic character sets */
4261 CHAR /* Latin/Cyrillic to CP866 */
4266 #endif /* CK_ANSIC */
4267 { /* xlcac */ /* PC Code Page 866 */
4271 CHAR /* Latin/Cyrillic to */
4276 #endif /* CK_ANSIC */
4277 { /* xlc55 */ /* PC Code Page 855 */
4281 CHAR /* Latin/Cyrillic to */
4286 #endif /* CK_ANSIC */
4287 { /* xlc1251 */ /* PC Code Page 1251 */
4291 CHAR /* Latin/Cyrillic to... */
4296 #endif /* CK_ANSIC */
4297 { /* xlcbu */ /* Bulgarian PC Code Page */
4301 CHAR /* Latin/Cyrillic to Old KOI-8 */
4306 #endif /* CK_ANSIC */
4311 CHAR /* Latin/Cyrillic to KOI8-R */
4316 #endif /* CK_ANSIC */
4319 case 0xa1: return(0xb3); /* Io */
4320 case 0xf1: return(0xa3); /* io */
4322 if (c > 0x7f && c < 0xc0)
4328 CHAR /* Latin/Cyrillic to KOI8-U */
4333 #endif /* CK_ANSIC */
4336 case 0xa1: return(0xb3); /* Io */
4337 case 0xf1: return(0xa3); /* io */
4338 case 0xf4: return(0xa4); /* Ukrainian ie */
4339 case 0xf6: return(0xa6); /* Ukrainian i */
4340 case 0xf7: return(0xa7); /* Ukrainian yi */
4341 case 0xf3: return(0xad); /* Ukrainian ghe with upturn */
4342 case 0xa4: return(0xb4); /* Ukrainian Ie */
4343 case 0xa6: return(0xb6); /* Ukrainian I */
4344 case 0xa7: return(0xb7); /* Ukrainian Yi */
4345 case 0xa3: return(0xbd); /* Ukrainian Ghe with upturn */
4347 if (c > 0x7f && c < 0xc0)
4358 #endif /* CK_ANSIC */
4359 { /* xlcsk */ /* Latin/Cyrillic to Short KOI */
4368 #endif /* CK_ANSIC */
4369 { /* xlcas */ /* Latin/Cyrillic to ASCII */
4370 if (langs[language].id == L_RUSSIAN)
4373 return((c > 127) ? '?' : c);
4381 #endif /* CK_ANSIC */
4382 { /* xaclc */ /* to Latin/Cyrillic */
4391 #endif /* CK_ANSIC */
4392 { /* x55lc */ /* to Latin/Cyrillic */
4396 CHAR /* Bulgarian PC Code Page ... */
4401 #endif /* CK_ANSIC */
4402 { /* xbulc */ /* to Latin/Cyrillic */
4411 #endif /* CK_ANSIC */
4412 { /* x1251lc */ /* to Latin/Cyrillic */
4416 CHAR /* Old KOI-8 to Latin/Cyrillic */
4421 #endif /* CK_ANSIC */
4426 CHAR /* KOI8-R to Latin/Cyrillic */
4431 #endif /* CK_ANSIC */
4433 if (c == 0xb3) return(0xa1);
4434 else if (c == 0xa3) return(0xf1);
4435 else if (c > 0x7f && c < 0xc0)
4440 CHAR /* KOI8-U to Latin/Cyrillic */
4445 #endif /* CK_ANSIC */
4448 case 0xb3: return(0xa1); /* Io */
4449 case 0xa3: return(0xf1); /* io */
4450 case 0xa4: return(0xf4); /* Ukrainian ie */
4451 case 0xa6: return(0xf6); /* Ukrainian i */
4452 case 0xa7: return(0xf7); /* Ukrainian yi */
4453 case 0xad: return(0xf3); /* Ukrainian ghe with upturn */
4454 case 0xb4: return(0xa4); /* Ukrainian Ie */
4455 case 0xb6: return(0xa6); /* Ukrainian I */
4456 case 0xb7: return(0xa7); /* Ukrainian Yi */
4457 case 0xbd: return(0xa3); /* Ukrainian Ghe with upturn */
4458 /* Note substitution of Gje for Ghe-Upturn, which is not in 8859-5 */
4460 if (c > 0x7f && c < 0xc0)
4471 #endif /* CK_ANSIC */
4472 { /* xskcy */ /* Short KOI to Latin/Cyrillic */
4473 return(yskcy[c & 0x7f]);
4481 #endif /* CK_ANSIC */
4482 { /* xascy */ /* ASCII to Latin/Cyrillic */
4483 if (langs[language].id == L_RUSSIAN) { /* If LANGUAGE == RUSSIAN */
4484 return(yskcy[c & 0x7f]); /* treat ASCII as Short KOI */
4485 } else return((c > 127) ? '?' : c);
4493 #endif /* CK_ANSIC */
4494 { /* xacas */ /* CP866 to ASCII */
4495 if (langs[language].id == L_RUSSIAN) {
4496 c = yaclc[c]; /* First to Latin/Cyrillic */
4497 return(ylcsk[c]); /* Then to Short KOI */
4498 } else return((c > 127) ? '?' : c);
4506 #endif /* CK_ANSIC */
4507 { /* x55as */ /* CP855 to ASCII */
4508 if (langs[language].id == L_RUSSIAN) {
4509 c = y55lc[c]; /* First to Latin/Cyrillic */
4510 return(ylcsk[c]); /* Then to Short KOI */
4511 } else return((c > 127) ? '?' : c);
4519 #endif /* CK_ANSIC */
4520 { /* x1251as */ /* CP81251 to ASCII */
4521 if (langs[language].id == L_RUSSIAN) {
4522 c = y1251lc[c]; /* First to Latin/Cyrillic */
4523 return(ylcsk[c]); /* Then to Short KOI */
4524 } else return((c > 127) ? '?' : c);
4532 #endif /* CK_ANSIC */
4533 { /* xskas */ /* Short KOI to ASCII */
4534 return((c > 95) ? '?' : c);
4542 #endif /* CK_ANSIC */
4543 { /* xk8as */ /* Old KOI-8 Cyrillic to ASCII */
4544 if (langs[language].id == L_RUSSIAN) {
4545 c = yk8lc[c]; /* First to Latin/Cyrillic */
4546 return(ylcsk[c]); /* Then to Short KOI */
4547 } else return((c > 127) ? '?' : c);
4555 #endif /* CK_ANSIC */
4556 { /* xl1sk */ /* Latin-1 to Short KOI */
4557 c = zl1as(c); /* Convert to ASCII */
4558 return(c = xassk(c)); /* Convert ASCII to Short KOI */
4566 #endif /* CK_ANSIC */
4567 { /* xw1lc */ /* CP1252 to Latin/Cyrillic */
4568 return((c < 160) ? xw1as(c) : zl1as(c));
4576 #endif /* CK_ANSIC */
4577 { /* xaslc */ /* ASCII to Latin/Cyrillic */
4578 if (langs[language].id == L_RUSSIAN)
4579 return(yskcy[c & 0x7f]);
4580 else return(c & 0x7f);
4588 #endif /* CK_ANSIC */
4589 { /* xasac */ /* ASCII to CP866 */
4592 if (langs[language].id == L_RUSSIAN) { /* Use Short KOI */
4593 c = xskcy(c); /* Translate to Latin/Cyrillic */
4594 return(ylcac[c]); /* Then to CP866 */
4595 } else return(c & 0x7f);
4603 #endif /* CK_ANSIC */
4604 { /* xas55 */ /* ASCII to CP855 */
4607 if (langs[language].id == L_RUSSIAN) { /* Use Short KOI */
4608 c = xskcy(c); /* Translate to Latin/Cyrillic */
4609 return(ylc55[c]); /* Then to CP866 */
4610 } else return(c & 0x7f);
4618 #endif /* CK_ANSIC */
4619 { /* xas1251 */ /* ASCII to CP81251 */
4622 if (langs[language].id == L_RUSSIAN) { /* Use Short KOI */
4623 c = xskcy(c); /* Translate to Latin/Cyrillic */
4624 return(ylc1251[c]); /* Then to CP866 */
4625 } else return(c & 0x7f);
4633 #endif /* CK_ANSIC */
4634 { /* xask8 */ /* ASCII to KOI-8 */
4637 if (langs[language].id == L_RUSSIAN) { /* Use Short KOI */
4638 c = xskcy(c); /* Translate to Latin/Cyrillic */
4639 return(ylck8[c]); /* Then to KOI-8 */
4640 } else return(c & 0x7f);
4642 #else /* No Cyrillic */
4645 #define x1251as NULL
4648 #define x1251lc NULL
4651 #define xas1251 NULL
4664 #define xlc1251 NULL
4675 #endif /* CYRILLIC */
4677 /* Translation functions for Hebrew character sets */
4686 #endif /* CK_ANSIC */
4687 { /* xash7 */ /* ASCII to Hebrew-7 */
4690 if (c == 96) return('?');
4691 if (c > 96 && c < 123) return(c - 32);
4700 #endif /* CK_ANSIC */
4701 { /* xl1h7 */ /* Latin-1 to Hebrew-7 */
4702 return(xash7(xl1as(c)));
4710 #endif /* CK_ANSIC */
4711 { /* xl1lh */ /* Latin-1 to Latin/Hebrew */
4713 case 170: return('a'); /* Feminine ordinal */
4714 case 186: return('o'); /* Masculine ordinal */
4715 case 215: return(170); /* Times */
4716 case 247: return(186); /* Divide */
4717 default: return( (c > 190) ? xl1as(c) : c );
4726 #endif /* CK_ANSIC */
4727 { /* xw1lh */ /* CP1252 to Latin/Hebrew */
4729 case 170: return('a'); /* Feminine ordinal */
4730 case 186: return('o'); /* Masculine ordinal */
4731 case 215: return(170); /* Times */
4732 case 247: return(186); /* Divide */
4737 return((c > 190) ? xl1as(c) : c);
4747 #endif /* CK_ANSIC */
4748 { /* xl2h7 */ /* Latin-2 to Hebrew-7 */
4749 return(xash7(xl2as(c)));
4761 #endif /* CK_ANSIC */
4762 { /* xlch7 */ /* Latin/Cyrillic to Hebrew-7 */
4763 return(xash7(xlcas(c)));
4765 #endif /* NOCYRIL */
4772 #endif /* CK_ANSIC */
4773 { /* xlhas */ /* Latin/Hebrew to ASCII */
4774 return( (c > 127) ? '?' : c );
4782 #endif /* CK_ANSIC */
4783 { /* xlhl1 */ /* Latin/Hebrew to Latin-1 */
4785 case 170: return(215);
4786 case 186: return(247);
4787 default: return( (c > 190) ? '?' : c );
4796 #endif /* CK_ANSIC */
4797 { /* xlhw1 */ /* Latin/Hebrew to CP1252 */
4798 if (c > 127 && c < 160)
4801 case 170: return(215);
4802 case 186: return(247);
4803 default: return( (c > 190) ? '?' : c );
4812 #endif /* CK_ANSIC */
4813 { /* xlh62 */ /* Latin/Hebrew to CP862 */
4822 #endif /* CK_ANSIC */
4823 { /* xl162 */ /* Latin-1 to CP862 */
4824 return(xlh62(xl1lh(c))); /* Via Latin/Hebrew */
4832 #endif /* CK_ANSIC */
4833 { /* xlhh7 */ /* Latin/Hebrew to Hebrew-7 */
4842 #endif /* CK_ANSIC */
4843 { /* xh7as */ /* Hebrew-7 to ASCII */
4846 return( (c > 95 && c < 123) ? '?' : c );
4854 #endif /* CK_ANSIC */
4855 { /* x62lh */ /* CP862 to Latin/Hebrew */
4864 #endif /* CK_ANSIC */
4865 { /* x62as */ /* CP862 to ASCII */
4866 return( xlhas(x62lh(c)) );
4874 #endif /* CK_ANSIC */
4875 { /* x62l1 */ /* CP862 to Latin-1 */
4876 return( xlhl1(x62lh(c)) );
4884 #endif /* CK_ANSIC */
4885 { /* xh7lh */ /* Hebrew-7 to Latin/Hebrew */
4891 #else /* No Hebrew */
4913 /* Translation functions for Greek character sets */
4922 #endif /* CK_ANSIC */
4923 { /* xaseg */ /* ASCII to ELOT 927 */
4926 if (c > 96 && c < 123) return(c - 32);
4935 #endif /* CK_ANSIC */
4936 { /* xl1ge */ /* Latin-1 to ELOT 927 */
4937 return(xaseg(xl1as(c)));
4945 #endif /* CK_ANSIC */
4946 { /* xl2lg */ /* Latin-1 to Latin/Greek */
4947 if (c < 160) return(c);
4948 else if (c == 160 || c == 168 || c == 173 || c == 174)
4958 #endif /* CK_ANSIC */
4959 { /* xl1lg */ /* Latin-1 to Latin/Greek */
4960 if (c < 160) return(c);
4962 case 160: /* Themselves */
4979 case 181: /* Lowercase mu */
4991 #endif /* CK_ANSIC */
4992 { /* xw1lg */ /* CP1252 to Latin/Greek */
4993 return((c < 160) ? xw1as(c) : xl1lg(c));
5003 #endif /* CK_ANSIC */
5004 { /* xl2eg */ /* Latin-2 to ELOT 927 */
5005 return(xaseg(xl2as(c)));
5017 #endif /* CK_ANSIC */
5018 { /* xlceg */ /* Latin/Cyrillic to ELOT 927 */
5019 return(xaseg(xlcas(c)));
5021 #endif /* NOCYRIL */
5028 #endif /* CK_ANSIC */
5029 { /* xlgas */ /* Latin/Greek to ASCII */
5030 return( (c > 127) ? '?' : c );
5038 #endif /* CK_ANSIC */
5039 { /* xlgl1 */ /* Latin/Greek to Latin-1 */
5051 #endif /* CK_ANSIC */
5052 { /* xlgw1 */ /* Latin/Greek to Latin-1 */
5053 if (c > 127 && c < 160)
5063 #endif /* CK_ANSIC */
5064 { /* xlg69 */ /* Latin/Greek to CP869 */
5073 #endif /* CK_ANSIC */
5074 { /* xl169 */ /* Latin-1 to CP869 */
5075 return(xlg69(xl1lg(c))); /* Via Latin/Greek */
5083 #endif /* CK_ANSIC */
5084 { /* xlgeg */ /* Latin/Greek to ELOT 927 */
5093 #endif /* CK_ANSIC */
5094 { /* xegas */ /* ELOT 927 to ASCII */
5097 return( (c > 96 && c < 123) ? '?' : c );
5105 #endif /* CK_ANSIC */
5106 { /* x69lg */ /* CP869 to Latin/Greek */
5115 #endif /* CK_ANSIC */
5116 { /* x69as */ /* CP869 to ASCII */
5117 return( xlgas(x69lg(c)) );
5125 #endif /* CK_ANSIC */
5126 { /* x69l1 */ /* CP869 to Latin-1 */
5127 return( xlgl1(x69lg(c)) );
5135 #endif /* CK_ANSIC */
5136 { /* xeglg */ /* ELOT 927 to Latin/Greek */
5140 #else /* No Greek */
5165 /* Translation functions for Japanese Kanji character sets */
5169 Translate Kanji Transfer Character Set (EUC) to local file character set,
5170 contributed by Dr. Hirofumi Fujii, Japan High Energy Research Laboratory
5171 (KEK), Tokyo, Japan.
5173 a is a byte to be translated, which may be a single-byte character,
5174 the Katakana prefix, the first byte of a two-byte Kanji character, or the
5175 second byte of 2-byte Kanji character.
5177 fn is the output function.
5179 Returns 0 on success, -1 on failure.
5182 _PROTOTYP(static int jpnxas, (int, int[]) );
5183 _PROTOTYP(static int jpnxkt, (int, int[]) );
5184 _PROTOTYP(static int jpnxkn, (int[], int[]) );
5186 static int jpncnt; /* Byte count for Japanese */
5187 static int jpnlst; /* Last status (for JIS7) */
5190 jpnxas(a, obuf) int a; int obuf[]; { /* Translate ASCII to local file code */
5194 if (fcharset == FC_JIS7) {
5221 jpnxkt(a, obuf) int a; int obuf[]; {
5222 /* Translate JIS X 201 Katakana to local code */
5227 if (fcharset == FC_JIS7) {
5229 case 2: /* from Kanji */
5233 case 0: /* from Roman */
5236 obuf[r++] = (a & 0x7f);
5240 if (fcharset == FC_JEUC)
5242 obuf[r++] = (a | 0x80);
5248 jpnxkn(ibuf, obuf) int ibuf[], obuf[]; {
5249 /* Translate JIS X 0208 Kanji to local code */
5253 c1 = ibuf[0] & 0x7f;
5254 c2 = ibuf[1] & 0x7f;
5256 if (fcharset == FC_SHJIS) {
5262 if (c2 >= 0x7f) c2++;
5264 c1 = ((c1 - 0x21) >> 1) + 0x81;
5265 if (c1 > 0x9f) c1 += 0x40;
5270 } else if (fcharset == FC_JIS7) {
5274 obuf[r++] = 0x0f; /* From Katakana */
5285 obuf[0] = (c1 | 0x80);
5286 obuf[1] = (c2 | 0x80);
5294 /* Initialize parameters for xkanji */
5295 /* This function should be called when F/X-packet is received */
5296 jpncnt = jpnlst = 0;
5302 xkanjz(int (*fn)(char))
5304 xkanjz(fn) int (*fn)();
5305 #endif /* CK_ANSIC */
5309 This function must be called when Z-packet is received
5310 (before closing the file).
5315 if (fcharset == FC_JIS7) {
5316 c = 'A'; /* Dummy Roman character */
5317 r = jpnxas(c, obuf) - 1; /* -1 removes Dummy character */
5319 for (i = 0; i < r; i++)
5320 if (((*fn)((char) obuf[i])) < 0)
5329 xkanji(int a, int (*fn)(char))
5331 xkanji(a, fn) int a; int (*fn)();
5332 #endif /* CK_ANSIC */
5344 if ((a & 0x80) == 0) {
5345 /* 8th bit is 0, i.e., single-byte code */
5346 r = jpnxas(a, obuf);
5349 /* 8th bit is 1, check the range */
5351 if (((c7 > 0x20) && (c7 < 0x7f)) || (c7 == 0x0e)) {
5352 /* double byte code */
5355 /* single byte code */
5356 r = jpnxas(a, obuf);
5361 /* not the 1st byte */
5363 if (xbuf[0] == 0x8e) {
5364 r = jpnxkt(xbuf[1], obuf);
5367 r = jpnxkn(xbuf, obuf);
5372 for (i = 0; i < r; i++ )
5373 if (((*fn)((char) obuf[i])) < 0)
5382 Function for translating from Japanese file character set
5383 to Japanese EUC transfer character set.
5384 Returns a pointer to a string containing 0, 1, or 2 bytes.
5388 static int jpnstz; /* status for JIS-7 */
5389 static int jpnpnd; /* number of pending bytes */
5390 static int jpnpnt; /* pending buffer index */
5391 static int jpnpbf[8]; /* pending buffer */
5393 /* There is some duplication here between the old and new JIS-7 parsers */
5394 /* to be cleaned up later... */
5397 j7init() { /* Initialize JIS-7 parser */
5404 getj7() { /* Reads JIS-7 returns next EUC byte */
5407 if (jpnpnd > 0) { /* If something is pending */
5408 x = (unsigned) jpnpbf[jpnpnt++]; /* Get it */
5410 if (jpnpnd < 0) jpnpnd = 0;
5411 return((unsigned)x);
5415 if ((x = zminchar()) < 0) return(x);
5416 while (jpnpnd == 0) { /* While something is pending... */
5417 if ((x > 0x20) && (x < 0x7f)) { /* 7-bit graphic character */
5419 case 1: /* Katakana */
5421 /* This can't be right... */
5422 jpnpbf[jpnpnd++] = 0x80; /* Insert flag (NOT SS2???) */
5424 jpnpbf[jpnpnd++] = 0x8e; /* Insert SS2 */
5425 #endif /* COMMENT */
5426 jpnpbf[jpnpnd++] = (x | 0x80); /* Insert Kana + 8th bit */
5429 jpnpbf[jpnpnd++] = (x | 0x80); /* Get another byte */
5430 if ((x = zminchar()) < 0) return(x);
5431 jpnpbf[jpnpnd++] = (x | 0x80);
5433 default: /* ASCII / JIS Roman */
5434 jpnpbf[jpnpnd++] = x;
5437 } else if (x == 0x0e) { /* ^N = SO */
5438 jpnstz = 1; /* Katakana */
5439 if ((x = zminchar()) < 0) return(x);
5440 } else if (x == 0x0f) { /* ^O = SI */
5441 jpnstz = 0; /* ASCII / JIS Roman */
5442 if ((x = zminchar()) < 0) return(x);
5443 } else if (x == 0x1b) { /* Escape */
5444 jpnpbf[jpnpnd++] = x; /* Save in buffer */
5445 if ((x = zminchar()) < 0) return(x);
5446 jpnpbf[jpnpnd++] = x; /* Save in buffer */
5447 if (x == '$') { /* <ESC>$ */
5448 if ((x = zminchar()) < 0) return(x);
5449 jpnpbf[jpnpnd++] = x;
5450 if ((x == '@') || (x == 'B')) { /* Kanji */
5452 jpnpnt = jpnpnd = 0;
5453 if ((x = zminchar()) < 0) return(x);
5455 } else if (x == '(') { /* <ESC>( == 94-byte single-byte set */
5456 if ((x = zminchar()) < 0) return(x);
5457 jpnpbf[jpnpnd++] = x;
5458 if ((x == 'B') || (x == 'J')) { /* ASCII or JIS Roman */
5459 jpnstz = 0; /* Set state */
5460 jpnpnt = jpnpnd = 0; /* Reset pointers */
5461 if ((x = zminchar()) < 0) return(x);
5463 } else if (x == 0x1b) { /* <ESC><ESC> */
5464 jpnpnt = jpnpnd = 0; /* Reset pointers, stay in state */
5465 if ((x = zminchar()) < 0) return(x);
5467 } else { /* Not <ESC> - just save it */
5468 jpnpbf[jpnpnd++] = x;
5472 x = (unsigned)jpnpbf[jpnpnt++];
5474 return((unsigned)x);
5479 eu_to_sj(USHORT eu) /* EUC-JP to Shift-JIS */
5481 eu_to_sj(eu) USHORT eu;
5482 #endif /* CK_ANSIC */
5485 union ck_short jcode,scode;
5488 c1 = (jcode.x_char[byteorder] & 0x7f);
5489 c2 = (jcode.x_char[1-byteorder] & 0x7f);
5497 c1 = ((c1 - 0x21) >> 1) + 0x81;
5501 scode.x_char[byteorder] = c1;
5502 scode.x_char[1-byteorder] = c2;
5503 return(scode.x_short);
5509 sj_to_eu(USHORT sj) /* Shift-JIS to EUC-JP */
5511 sj_to_eu(sj) USHORT sj;
5512 #endif /* CK_ANSIC */
5514 union ck_short jcode, scode;
5518 c0 = scode.x_char[byteorder]; /* Left (hi order) byte */
5519 c1 = scode.x_char[1-byteorder]; /* Right (lo order) byte */
5521 if (((c0 >= 0x81) && (c0 <= 0x9f)) || /* High order byte has 8th bit set */
5522 ((c0 >= 0xe0) && (c0 <= 0xfc))) { /* Kanji */
5523 if (c0 <= 0x9f) /* Two bytes in */
5524 c0 -= 0x71; /* Do the shifting... */
5528 if (c1 > 0x7f) c1 -= 1;
5535 jcode.x_char[byteorder] = (c0 | 0x80); /* Two bytes out */
5536 jcode.x_char[1-byteorder] = (c1 | 0x80);
5538 } else if (c0 == 0) { /* Single byte */
5539 if (c1 >= 0xa1 && c1 <= 0xdf) { /* Katakana */
5540 jcode.x_char[byteorder] = 0x8e; /* SS2 */
5541 jcode.x_char[1-byteorder] = c1; /* Kana code */
5542 } else { /* ASCII or C0 */
5545 } else { /* Something bad */
5546 debug(F001,"sj_to_eu bad sj","",sj);
5547 jcode.x_short = 0xffff;
5549 return(jcode.x_short);
5553 zkanjf() { /* Initialize */
5554 jpnstz = jpnpnd = jpnpnt = 0;
5565 zkanji(int (*fn)(void))
5567 zkanji(fn) int (*fn)();
5568 #endif /* CK_ANSIC */
5570 /* Read Japanese local code and translate to Japanese EUC */
5574 /* No pending characters */
5575 if (fcharset == FC_SHJIS) { /* Translating from Shift-JIS */
5578 return(jpnpbf[jpnpnt++]);
5581 jpnpnd = jpnpnt = 0;
5582 if (((a >= 0x81) && (a <= 0x9f)) ||
5583 ((a >= 0xe0) && (a <= 0xfc))) { /* 2-byte Kanji code */
5585 if ((sc[1] = (*fn)()) < 0) /* Get second byte */
5591 sc[0] = sc[0] * 2 + 1;
5594 if (sc[1] >= 0x9e) {
5601 jpnpbf[0] = (sc[1] | 0x80);
5604 } else if ((a >= 0xa1) && (a <= 0xdf)) { /* Katakana */
5611 } else if (fcharset == FC_JIS7 ) { /* 7-bit JIS X 0208 */
5613 a = jpnpbf[jpnpnt++];
5618 if ((a = (*fn)()) < 0)
5620 while (jpnpnd == 0) {
5621 if ((a > 0x20) && (a < 0x7f)) {
5624 jpnpbf[jpnpnd++] = 0x80; /* Katakana */
5625 jpnpbf[jpnpnd++] = (a | 0x80);
5628 jpnpbf[jpnpnd++] = (a | 0x80); /* Kanji */
5629 if ((a = (*fn)()) < 0)
5631 jpnpbf[jpnpnd++] = (a | 0x80);
5634 jpnpbf[jpnpnd++] = a; /* Single byte */
5637 } else if (a == 0x0e) {
5639 if ((a = (*fn)()) < 0)
5641 } else if (a == 0x0f) {
5643 if ((a = (*fn)()) < 0)
5645 } else if (a == 0x1b) {
5646 jpnpbf[jpnpnd++] = a; /* Escape */
5647 if ((a = (*fn)()) < 0)
5649 jpnpbf[jpnpnd++] = a;
5651 if ((a = (*fn)()) < 0)
5653 jpnpbf[jpnpnd++] = a;
5654 if ((a == '@') || (a == 'B')) {
5656 jpnpnt = jpnpnd = 0;
5657 if ((a = (*fn)()) < 0)
5660 } else if (a == '(') {
5661 if ((a = (*fn)()) < 0)
5663 jpnpbf[jpnpnd++] = a;
5664 if ((a == 'B') || (a == 'J')) {
5666 jpnpnt = jpnpnd = 0;
5667 if ((a = (*fn)()) < 0)
5670 } else if (a == 0x1b) {
5671 jpnpnt = jpnpnd = 0;
5672 if ((a = (*fn)()) < 0)
5676 jpnpbf[jpnpnd++] = a;
5680 a = jpnpbf[jpnpnt++];
5690 /* Euro functions */
5698 #endif /* CK_ANSIC */
5699 { /* xl2l9 */ /* Latin-2 to Latin-9... */
5701 case 169: return((CHAR)166); /* S caron */
5702 case 185: return((CHAR)168); /* s caron */
5703 case 174: return((CHAR)180); /* Z caron */
5704 case 190: return((CHAR)184); /* z caron */
5711 _PROTOTYP( CHAR xl258, ( CHAR ) );
5717 #endif /* CK_ANSIC */
5718 { /* xl258 */ /* Latin-2 to CP858... */
5731 #endif /* CK_ANSIC */
5732 { /* zl9as */ /* Latin-9 to US ASCII... */
5733 if (c < (CHAR)0x80) return(c); /* Save a function call */
5735 case 0xa4: return(UNK); /* Euro */
5736 case 0xa6: return('S'); /* S Caron */
5737 case 0xa8: return('s'); /* s Caron */
5738 case 0xb4: return('Z'); /* Z Caron */
5739 case 0xbc: return('O'); /* OE digraph */
5740 case 0xbd: return('o'); /* oe digraph */
5741 case 0xbe: return('Y'); /* Y diaeresis */
5742 default: return(zl1as(c)); /* The rest is like Latin-1 */
5746 _PROTOTYP( CHAR xl9as, ( CHAR ) );
5752 #endif /* CK_ANSIC */
5753 { /* xl9as */ /* Latin-9 to US ASCII... */
5754 if (c < (CHAR)0x80) return(c); /* Save a function call */
5756 case 0xa4: return(UNK); /* Euro */
5757 case 0xa6: return('S'); /* S Caron */
5758 case 0xa8: return('s'); /* s Caron */
5759 case 0xb4: return('Z'); /* Z Caron */
5760 case 0xb8: return('z'); /* z Caron */
5761 case 0xbc: return('O'); /* OE digraph */
5762 case 0xbd: return('o'); /* oe digraph */
5763 case 0xbe: return('Y'); /* Y diaeresis */
5764 default: return(xl1as(c)); /* The rest is like Latin-1 */
5768 CHAR /* CP1252 to Latin-9 */
5773 #endif /* CK_ANSIC */
5776 case 0x80: return(0xa4); /* Euro sign */
5777 case 0x8a: return(0xa6); /* S caron */
5778 case 0x8c: return(0xbc); /* OE */
5779 case 0x8e: return(0xb4); /* Z caron */
5780 case 0x9a: return(0xa8); /* s caron */
5781 case 0x9c: return(0xbd); /* oe */
5782 case 0x9e: return(0xb8); /* z caron */
5783 case 0x9f: return(0xbe); /* Y diaeresis */
5784 case 0xa4: /* Currency sign */
5785 case 0xa6: /* Broken vertical bar */
5786 case 0xa8: /* Diaeresis */
5787 case 0xb4: /* Acute accent */
5788 case 0xb8: /* Cedilla */
5789 case 0xbc: /* 1/4 */
5790 case 0xbd: /* 1/2 */
5791 case 0xbe: return('?'); /* 3/4 */
5792 default: return((c < 160) ? xw1as(c) : c);
5802 #endif /* CK_ANSIC */
5803 { /* xl9l2 */ /* Latin-9 to Latin-2... */
5804 if (c < (CHAR)0x80) return(c); /* Save a function call */
5806 case 0xa4: return(UNK); /* Euro */
5807 case 0xa6: return((CHAR)0xa9); /* S Caron */
5808 case 0xa8: return((CHAR)0xb9); /* s Caron */
5809 case 0xb4: return((CHAR)0xae); /* Z Caron */
5810 case 0xb8: return((CHAR)0xaf); /* z Caron */
5811 case 0xbc: return('O'); /* OE digraph */
5812 case 0xbd: return('o'); /* oe digraph */
5813 case 0xbe: return('Y'); /* Y diaeresis */
5814 default: return(xl1l2(c)); /* The rest is like Latin-1 */
5826 #endif /* CK_ANSIC */
5827 { /* xl958 */ /* Latin-9 to CP858... */
5828 if (c == 0xa4) /* Euro Symbol */
5830 else if (c == 0x9e) /* This was currency symbol */
5841 #endif /* CK_ANSIC */
5842 { /* x58as */ /* CP858 to US ASCII... */
5843 if (c == 0xd5) /* Euro rather than dotless i */
5846 return(x85as(c)); /* The rest is like CP850 */
5854 #endif /* CK_ANSIC */
5855 { /* x58l1 */ /* CP858 to Latin-1... */
5856 if (c == 0xd5) /* Euro rather than dotless i */
5857 return((CHAR)0xa4); /* Return currency symbol */
5858 else if (c == 0xcf) /* This keeps it invertible */
5870 #endif /* CK_ANSIC */
5871 { /* x58l2 */ /* CP858 to Latin-2... */
5872 if (c == 0xd5) /* Euro rather than dotless i */
5873 return((CHAR)0xa4); /* Return currency symbol */
5874 else if (c == 0xcf) /* This keeps it invertible */
5875 return((CHAR)0x9e); /* (if it ever was...) */
5876 else /* Otherwise like CP850 */
5888 #endif /* CK_ANSIC */
5889 { /* x58l9 */ /* CP-858 to Latin-9... */
5890 if (c == 0xd5) /* Euro rather than dotless i */
5891 return((CHAR)0xa4); /* Return currency symbol */
5892 else if (c == 0xcf) /* This keeps it invertible */
5893 return((CHAR)0x9e); /* (if it ever was...) */
5894 else /* Otherwise like CP850 */
5895 return(x85l1(c)); /* to Latin-1 */
5898 /* End Euro functions */
5901 /* TABLES OF TRANSLATION FUNCTIONS */
5904 First, the table of translation functions for RECEIVING files. That is,
5905 *from* the TRANSFER character set *to* the FILE character set, an array of
5906 pointers to functions. The first index is the TRANSFER CHARACTER-SET
5907 number, the second index is the FILE CHARACTER-SET number.
5909 These arrays must be fully populated, even if (as is the case with Kanji
5910 character sets), all the entries are NULL. Otherwise, subscript
5911 calculations will be wrong and we'll use the wrong functions.
5914 /* Pointers to byte-for-byte translation functions */
5916 _PROTOTYP( CHAR (*rx), (CHAR) );
5917 _PROTOTYP( CHAR (*sx), (CHAR) );
5920 _PROTOTYP( int (*xut), (USHORT) ); /* Translation function UCS to TCS */
5921 _PROTOTYP( int (*xuf), (USHORT) ); /* Translation function UCS to FCS */
5922 _PROTOTYP( USHORT (*xtu), (CHAR) ); /* Translation function TCS to UCS */
5923 _PROTOTYP( USHORT (*xfu), (CHAR) ); /* Translation function FCS to UCS */
5924 #endif /* UNICODE */
5927 CHAR (*xlr[MAXTCSETS+1][MAXFCSETS+1])(CHAR) =
5929 CHAR (*xlr[MAXTCSETS+1][MAXFCSETS+1])() =
5930 #endif /* CK_ANSIC */
5932 NULL, /* 0,0 transparent to us ascii */
5933 NULL, /* 0,1 transparent to uk ascii */
5934 NULL, /* 0,2 transparent to dutch nrc */
5935 NULL, /* 0,3 transparent to finnish nrc */
5936 NULL, /* 0,4 transparent to french nrc */
5937 NULL, /* 0,5 transparent to fr-canadian nrc */
5938 NULL, /* 0,6 transparent to german nrc */
5939 NULL, /* 0,7 transparent to hungarian nrc */
5940 NULL, /* 0,8 transparent to italian nrc */
5941 NULL, /* 0,9 transparent to norge/danish nrc */
5942 NULL, /* 0,10 transparent to portuguese nrc */
5943 NULL, /* 0,11 transparent to spanish nrc */
5944 NULL, /* 0,12 transparent to swedish nrc */
5945 NULL, /* 0,13 transparent to swiss nrc */
5946 NULL, /* 0,14 transparent to latin-1 */
5947 NULL, /* 0,15 transparent to latin-2 */
5948 NULL, /* 0,16 transparent to DEC MCS */
5949 NULL, /* 0,17 transparent to NeXT */
5950 NULL, /* 0,18 transparent to CP437 */
5951 NULL, /* 0,19 transparent to CP850 */
5952 NULL, /* 0,20 transparent to CP852 */
5953 NULL, /* 0,21 transparent to Macintosh Latin */
5954 NULL, /* 0,22 transparent to DGI */
5955 NULL, /* 0,23 transparent to HP */
5956 NULL, /* 0,24 transparent to Latin/Cyrillic */
5957 NULL, /* 0,25 transparent to CP866 */
5958 NULL, /* 0,26 transparent to Short KOI-7 */
5959 NULL, /* 0,27 transparent to Old KOI-8 Cyrillic */
5960 NULL, /* 0,28 transparent to JIS-7 */
5961 NULL, /* 0,29 transparent to Shift-JIS */
5962 NULL, /* 0,30 transparent to J-EUC */
5963 NULL, /* 0,31 transparent to DEC Kanji */
5964 NULL, /* 0,32 transparent to Hebrew-7 */
5965 NULL, /* 0,33 transparent to Latin/Hebrew */
5966 NULL, /* 0,34 transparent to CP862 Hebrew */
5967 NULL, /* 0,35 transparent to ELOT 927 Greek */
5968 NULL, /* 0,36 transparent to Latin/Greek */
5969 NULL, /* 0,37 transparent to CP869 */
5970 NULL, /* 0,38 transparent to Latin-9 */
5971 NULL, /* 0,39 transparent to CP858 */
5972 NULL, /* 0,40 transparent to CP855 */
5973 NULL, /* 0,41 transparent to CP1251 */
5974 NULL, /* 0,42 transparent to Bulgarian */
5975 NULL, /* 0,43 transparent to CP1250 */
5976 NULL, /* 0,44 transparent to Mazovia */
5977 NULL, /* 0,45 transparent to UCS-2 */
5978 NULL, /* 0,46 transparent to UTF-8 */
5979 NULL, /* 0,47 transparent to KOI8R */
5980 NULL, /* 0,48 transparent to KOI8U */
5981 NULL, /* 0,49 transparent to CP1252 */
5982 NULL, /* 1,0 ascii to us ascii */
5983 NULL, /* 1,1 ascii to uk ascii */
5984 NULL, /* 1,2 ascii to dutch nrc */
5985 NULL, /* 1,3 ascii to finnish nrc */
5986 NULL, /* 1,4 ascii to french nrc */
5987 NULL, /* 1,5 ascii to fr-canadian nrc */
5988 NULL, /* 1,6 ascii to german nrc */
5989 NULL, /* 1,7 ascii to hungarian nrc */
5990 NULL, /* 1,8 ascii to italian nrc */
5991 NULL, /* 1,9 ascii to norge/danish nrc */
5992 NULL, /* 1,10 ascii to portuguese nrc */
5993 NULL, /* 1,11 ascii to spanish nrc */
5994 NULL, /* 1,12 ascii to swedish nrc */
5995 NULL, /* 1,13 ascii to swiss nrc */
5996 NULL, /* 1,14 ascii to latin-1 */
5997 NULL, /* 1,15 ascii to latin-2 */
5998 NULL, /* 1,16 ascii to DEC MCS */
5999 NULL, /* 1,17 ascii to NeXT */
6000 NULL, /* 1,18 ascii to CP437 */
6001 NULL, /* 1,19 ascii to CP850 */
6002 NULL, /* 1,20 ascii to CP852 */
6003 NULL, /* 1,21 ascii to Macintosh Latin */
6004 NULL, /* 1,22 ascii to DGI */
6005 NULL, /* 1,23 ascii to HP */
6006 xaslc, /* 1,24 ascii to Latin/Cyrillic */
6007 xasac, /* 1,25 ascii to CP866 */
6008 xassk, /* 1,26 ascii to Short KOI */
6009 xask8, /* 1,27 ascii to Old KOI-8 Cyrillic */
6010 NULL, /* 1,28 ascii to JIS-7 */
6011 NULL, /* 1,29 ascii to Shift-JIS */
6012 NULL, /* 1,30 ascii to J-EUC */
6013 NULL, /* 1,31 ascii to DEC Kanji */
6014 xash7, /* 1,32 ascii to Hebrew-7 */
6015 NULL, /* 1,33 ascii to Latin/Hebrew */
6016 NULL, /* 1,34 ascii to CP862 Hebrew */
6017 xaseg, /* 1,35 ascii to ELOT 927 Greek */
6018 NULL, /* 1,36 ascii to Latin/Greek */
6019 NULL, /* 1,37 ascii to CP869 */
6020 NULL, /* 1,38 ascii to Latin-9 */
6021 NULL, /* 1,39 ascii to CP858 */
6022 xas55, /* 1,40 ascii to CP855 */
6023 xas1251, /* 1,41 ascii to CP1251 */
6024 xleft128, /* 1,42 ascii to bulgarian */
6025 xleft128, /* 1,43 ascii to CP1250 */
6026 xleft128, /* 1,44 ascii to Mazovia */
6027 NULL, /* 1,45 ascii to UCS-2 */
6028 NULL, /* 1,46 ascii to UTF-8 */
6029 NULL, /* 1,47 ascii to KOI8-R */
6030 NULL, /* 1,48 ascii to KOI8-U */
6031 NULL, /* 1,49 ascii to CP1252 */
6032 zl1as, /* 2,0 latin-1 to us ascii */
6033 xl1uk, /* 2,1 latin-1 to uk ascii */
6034 xl1du, /* 2,2 latin-1 to dutch nrc */
6035 xl1fi, /* 2,3 latin-1 to finnish nrc */
6036 xl1fr, /* 2,4 latin-1 to french nrc */
6037 xl1fc, /* 2,5 latin-1 to fr-canadian nrc */
6038 xl1ge, /* 2,6 latin-1 to german nrc */
6039 xl1it, /* 2,7 latin-1 to italian nrc */
6040 xl1hu, /* 2,8 latin-1 to hungarian nrc */
6041 xl1no, /* 2,9 latin-1 to norge/danish nrc */
6042 xl1po, /* 2,10 latin-1 to portuguese nrc */
6043 xl1sp, /* 2,11 latin-1 to spanish nrc */
6044 xl1sw, /* 2,12 latin-1 to swedish nrc */
6045 xl1ch, /* 2,13 latin-1 to swiss nrc */
6046 NULL, /* 2,14 latin-1 to latin-1 */
6047 xl1l2, /* 2,15 latin-1 to latin-2 */
6048 xl1dm, /* 2,16 latin-1 to DEC MCS */
6049 xl1ne, /* 2,17 latin-1 to NeXT */
6050 xl143, /* 2,18 latin-1 to CP437 */
6051 xl185, /* 2,19 latin-1 to CP850 */
6052 xl152, /* 2,20 latin-1 to CP852 */
6053 xl1aq, /* 2,21 latin-1 to Macintosh Latin */
6054 xl1dg, /* 2,22 latin-1 to DGI */
6055 xl1r8, /* 2,23 latin-1 to HP Roman8 */
6056 zl1as, /* 2,24 latin-1 to Latin/Cyrillic */
6057 zl1as, /* 2,25 latin-1 to CP866 */
6058 xl1sk, /* 2,26 latin-1 to Short KOI */
6059 zl1as, /* 2,27 latin-1 to Old KOI-8 Cyrillic */
6060 NULL, /* 2,28 latin-1 to JIS-7 */
6061 NULL, /* 2,29 latin-1 to Shift-JIS */
6062 NULL, /* 2,30 latin-1 to J-EUC */
6063 NULL, /* 2,31 latin-1 to DEC Kanji */
6064 xl1h7, /* 2,32 latin-1 to Hebrew-7 */
6065 xl1lh, /* 2,33 latin-1 to Latin/Hebrew */
6066 xl162, /* 2,34 latin-1 to CP862 Hebrew */
6067 xl1eg, /* 2,35 latin-1 to ELOT 927 Greek */
6068 xl1lg, /* 2,36 latin-1 to Latin/Greek */
6069 xl169, /* 2,37 latin-1 to CP869 */
6070 NULL, /* 2,38 latin-1 to Latin9 */
6071 xl185, /* 2,39 latin-1 to CP858 */
6072 zl1as, /* 2,40 latin-1 to CP855 */
6073 zl1as, /* 2,41 latin-1 to CP1251 */
6074 zl1as, /* 2,42 latin-1 to Bulgarian */
6075 xl11250, /* 2,43 latin-1 to CP1250 */
6076 xl1mz, /* 2,44 latin-1 to Mazovia */
6077 NULL, /* 2,45 latin-1 to UCS-2 */
6078 NULL, /* 2,46 latin-1 to UTF-8 */
6079 zl1as, /* 2,47 latin-1 to KOI8R */
6080 zl1as, /* 2,48 latin-1 to KOI8U */
6081 xl1w1, /* 2,49 latin-1 to CP1252 */
6082 xl2as, /* 3,0 latin-2 to us ascii */
6083 xl2as, /* 3,1 latin-2 to uk ascii */
6084 xl2as, /* 3,2 latin-2 to dutch nrc */
6085 xl2as, /* 3,3 latin-2 to finnish nrc */
6086 xl2as, /* 3,4 latin-2 to french nrc */
6087 xl2as, /* 3,5 latin-2 to fr-canadian nrc */
6088 xl2as, /* 3,6 latin-2 to german nrc */
6089 xl2as, /* 3,7 latin-2 to italian nrc */
6090 xl2as, /* 3,8 latin-2 to hungarian nrc */
6091 xl2as, /* 3,9 latin-2 to norge/danish nrc */
6092 xl2as, /* 3,10 latin-2 to portuguese nrc */
6093 xl2as, /* 3,11 latin-2 to spanish nrc */
6094 xl2as, /* 3,12 latin-2 to swedish nrc */
6095 xl2as, /* 3,13 latin-2 to swiss nrc */
6096 xl2l1, /* 3,14 latin-2 to latin-1 */
6097 NULL, /* 3,15 latin-2 to latin-2 */
6098 xl2l1, /* 3,16 latin-2 to DEC MCS */
6099 xl2ne, /* 3,17 latin-2 to NeXT */
6100 xl243, /* 3,18 latin-2 to CP437 */
6101 xl285, /* 3,19 latin-2 to CP850 */
6102 xl252, /* 3,20 latin-2 to CP852 */
6103 xl2aq, /* 3,21 latin-2 to Macintosh Latin */
6104 xl2dg, /* 3,22 latin-2 to DGI */
6105 xl2r8, /* 3,23 latin-2 to HP */
6106 xl2as, /* 3,24 latin-2 to Latin/Cyrillic */
6107 xl2as, /* 3,25 latin-2 to CP866 */
6108 xl2sk, /* 3,26 latin-2 to Short KOI */
6109 xl2as, /* 3,27 latin-2 to Old KOI-8 Cyrillic */
6110 NULL, /* 3,28 latin-2 to JIS-7 */
6111 NULL, /* 3,29 latin-2 to Shift-JIS */
6112 NULL, /* 3,30 latin-2 to J-EUC */
6113 NULL, /* 3,31 latin-2 to DEC Kanji */
6114 xl2h7, /* 3,32 latin-2 to Hebrew-7 */
6115 xl2as, /* 3,33 latin-2 to Latin/Hebrew */
6116 xl2as, /* 3,34 latin-2 to CP862 Hebrew */
6117 xassk, /* 3,35 latin-2 to ELOT 927 Greek */
6118 xl2as, /* 3,36 latin-2 to Latin/Greek */
6119 xl2as, /* 3,37 latin-2 to CP869 */
6120 xl2l9, /* 3,38 latin-2 to Latin-9 */
6121 xl258, /* 3,39 latin-2 to CP858 */
6122 xl2as, /* 3,40 latin-2 to CP855 */
6123 xl2as, /* 3,41 latin-2 to CP1251 */
6124 xl2as, /* 3,42 latin-2 to Bulgarian */
6125 xl21250, /* 3,43 latin-2 to CP1250 */
6126 xl2mz, /* 3,44 latin-2 to Mazovia */
6127 NULL, /* 3,45 latin-2 to UCS-2 */
6128 NULL, /* 3,46 latin-2 to UTF-8 */
6129 xl2as, /* 3,47 latin-2 to KOI8R */
6130 xl2as, /* 3,48 latin-2 to KOI8U */
6131 xl2w1, /* 3,49 latin-2 to CP1252 */
6132 xlcas, /* 4,0 latin/cyrillic to us ascii */
6133 xlcas, /* 4,1 latin/cyrillic to uk ascii */
6134 xlcas, /* 4,2 latin/cyrillic to dutch nrc */
6135 xlcas, /* 4,3 latin/cyrillic to finnish ascii */
6136 xlcas, /* 4,4 latin/cyrillic to french nrc */
6137 xlcas, /* 4,5 latin/cyrillic to fr-canadian nrc */
6138 xlcas, /* 4,6 latin/cyrillic to german nrc */
6139 xlcas, /* 4,7 latin/cyrillic to italian nrc */
6140 xlcas, /* 4,8 latin/cyrillic to hungarian nrc */
6141 xlcas, /* 4,9 latin/cyrillic to norge/danish nrc */
6142 xlcas, /* 4,10 latin/cyrillic to portuguese nrc */
6143 xlcas, /* 4,11 latin/cyrillic to spanish nrc */
6144 xlcas, /* 4,12 latin/cyrillic to swedish nrc */
6145 xlcas, /* 4,13 latin/cyrillic to swiss nrc */
6146 xlcas, /* 4,14 latin/cyrillic to latin-1 */
6147 xlcas, /* 4,15 latin/cyrillic to latin-2 */
6148 xlcas, /* 4,16 latin/cyrillic to DEC MCS */
6149 xlcas, /* 4,17 latin/cyrillic to NeXT */
6150 xlcas, /* 4,18 latin/cyrillic to CP437 */
6151 xlcas, /* 4,19 latin/cyrillic to CP850 */
6152 xlcas, /* 4,20 latin/cyrillic to CP852 */
6153 xlcas, /* 4,21 latin/cyrillic to Macintosh Latin */
6154 xlcas, /* 4,22 latin/cyrillic to DGI */
6155 xlcas, /* 4,23 latin/cyrillic to HP */
6156 NULL, /* 4,24 latin/cyrillic to Latin/Cyrillic */
6157 xlcac, /* 4,25 latin/cyrillic to CP866 */
6158 xlcsk, /* 4,26 latin/cyrillic to Short KOI */
6159 xlck8, /* 4,27 latin/cyrillic to Old KOI-8 Cyrillic */
6160 NULL, /* 4,28 latin/cyril to JIS-7 */
6161 NULL, /* 4,29 latin/cyril to Shift-JIS */
6162 NULL, /* 4,30 latin/cyril to J-EUC */
6163 NULL, /* 4,31 latin/cyril to DEC Kanji */
6164 xlch7, /* 4,32 latin/cyril to Hebrew-7 */
6165 xlcas, /* 4,33 latin/cyril to Latin/Hebrew */
6166 xlcas, /* 4,34 latin/cyril to CP862 Hebrew */
6167 xassk, /* 4,35 latin/cyril to ELOT 927 Greek */
6168 xleft160, /* 4,36 latin/cyril to Latin/Greek */
6169 xleft128, /* 4,37 latin/cyril to CP869 */
6170 xlcas, /* 4,38 latin/cyril to latin-9 */
6171 xlcas, /* 4,39 latin/cyril to CP858 */
6172 xlc55, /* 4,40 latin/cyril to CP855 */
6173 xlc1251, /* 4,41 latin/cyril to CP1251 */
6174 xlcbu, /* 4,42 latin/cyril to Bulgarian */
6175 xlcas, /* 4,43 latin/cyril to CP1250 */
6176 xlcas, /* 4,44 latin/cyril to Mazovia */
6177 NULL, /* 4,45 latin/cyril to UCS-2 */
6178 NULL, /* 4,46 latin/cyril to UTF-8 */
6179 xlckr, /* 4,47 latin/cyril to KOI8R */
6180 xlcku, /* 4,48 latin/cyril to KOI8U */
6181 xlcas, /* 4,49 latin/cyril to CP1252 */
6232 xlhas, /* 6,0 latin/hebrew to us ascii */
6233 xlhas, /* 6,1 latin/hebrew to uk ascii */
6234 xlhas, /* 6,2 latin/hebrew to dutch nrc */
6235 xlhas, /* 6,3 latin/hebrew to finnish ascii */
6236 xlhas, /* 6,4 latin/hebrew to french nrc */
6237 xlhas, /* 6,5 latin/hebrew to fr-canadian nrc */
6238 xlhas, /* 6,6 latin/hebrew to german nrc */
6239 xlhas, /* 6,7 latin/hebrew to italian nrc */
6240 xlhas, /* 6,8 latin/hebrew to hungarian nrc */
6241 xlhas, /* 6,9 latin/hebrew to norge/danish nrc */
6242 xlhas, /* 6,10 latin/hebrew to portuguese nrc */
6243 xlhas, /* 6,11 latin/hebrew to spanish nrc */
6244 xlhas, /* 6,12 latin/hebrew to swedish nrc */
6245 xlhas, /* 6,13 latin/hebrew to swiss nrc */
6246 xlhl1, /* 6,14 latin/hebrew to latin-1 */
6247 xlhas, /* 6,15 latin/hebrew to latin-2 */
6248 xlhl1, /* 6,16 latin/hebrew to DEC MCS */
6249 xlhas, /* 6,17 latin/hebrew to NeXT */
6250 xlhas, /* 6,18 latin/hebrew to CP437 */
6251 xlhas, /* 6,19 latin/hebrew to CP850 */
6252 xlhas, /* 6,20 latin/hebrew to CP852 */
6253 xlhas, /* 6,21 latin/hebrew to Macintosh Latin */
6254 xlhas, /* 6,22 latin/hebrew to DGI */
6255 xlhas, /* 6,23 latin/hebrew to HP */
6256 xlhas, /* 6,24 latin/hebrew to Latin/Cyrillic */
6257 xlhas, /* 6,25 latin/hebrew to CP866 */
6258 NULL, /* 6,26 latin/hebrew to Short KOI */
6259 xlhas, /* 6,27 latin/hebrew to Old KOI-8 Cyrillic */
6260 NULL, /* 6,28 latin/hebrew to JIS-7 */
6261 NULL, /* 6,29 latin/hebrew to Shift-JIS */
6262 NULL, /* 6,30 latin/hebrew to J-EUC */
6263 NULL, /* 6,31 latin/hebrew to DEC Kanji */
6264 xlhh7, /* 6,32 latin/hebrew to Hebrew-7 */
6265 NULL, /* 6,33 latin/hebrew to Latin/Hebrew */
6266 xlh62, /* 6,34 latin/hebrew to CP862 Hebrew */
6267 NULL, /* 6,35 latin/hebrew to ELOT 927 Greek */
6268 xlhas, /* 6,36 latin/hebrew to Latin/Greek */
6269 xlhas, /* 6,37 latin/hebrew to CP869 */
6270 xlhas, /* 6,38 latin/hebrew to Latin-9 */
6271 xlhas, /* 6,39 latin/hebrew to CP858 */
6272 xlhas, /* 6,40 latin/hebrew to CP855 */
6273 xlhas, /* 6,41 latin/hebrew to CP1251 */
6274 xlhas, /* 6,42 latin/hebrew to Bulgarian */
6275 xlhas, /* 6,43 latin/hebrew to CP1250 */
6276 xlhas, /* 6,44 latin/hebrew to Mazovia */
6277 NULL, /* 6,45 latin/hebrew to UCS-2 */
6278 NULL, /* 6,46 latin/hebrew to UTF-8 */
6279 NULL, /* 6,47 latin/hebrew to KOI8R */
6280 NULL, /* 6,48 latin/hebrew to KOI8U */
6281 xlhw1, /* 6,49 latin/hebrew to CP1252 */
6282 xlgas, /* 7,0 latin/greek to us ascii */
6283 xlgas, /* 7,1 latin/greek to uk ascii */
6284 xlgas, /* 7,2 latin/greek to dutch nrc */
6285 xlgas, /* 7,3 latin/greek to finnish ascii */
6286 xlgas, /* 7,4 latin/greek to french nrc */
6287 xlgas, /* 7,5 latin/greek to fr-canadian nrc */
6288 xlgas, /* 7,6 latin/greek to german nrc */
6289 xlgas, /* 7,7 latin/greek to italian nrc */
6290 xlgas, /* 7,8 latin/greek to hungarian nrc */
6291 xlgas, /* 7,9 latin/greek to norge/danish nrc */
6292 xlgas, /* 7,10 latin/greek to portuguese nrc */
6293 xlgas, /* 7,11 latin/greek to spanish nrc */
6294 xlgas, /* 7,12 latin/greek to swedish nrc */
6295 xlgas, /* 7,13 latin/greek to swiss nrc */
6296 xlgas, /* 7,14 latin/greek to latin-1 */
6297 xlgas, /* 7,15 latin/greek to latin-2 */
6298 xlgas, /* 7,16 latin/greek to DEC MCS */
6299 xlgas, /* 7,17 latin/greek to NeXT */
6300 xlgas, /* 7,18 latin/greek to CP437 */
6301 xlgas, /* 7,19 latin/greek to CP850 */
6302 xlgas, /* 7,20 latin/greek to CP852 */
6303 xlgas, /* 7,21 latin/greek to Macintosh Latin */
6304 xlgas, /* 7,22 latin/greek to DGI */
6305 xlgas, /* 7,23 latin/greek to HP */
6306 xleft160, /* 7,24 latin/greek to Latin/Cyrillic */
6307 xleft128, /* 7,25 latin/greek to CP866 */
6308 xassk, /* 7,26 latin/greek to Short KOI */
6309 xleft160, /* 7,27 latin/greek to Old KOI-8 Greek */
6310 NULL, /* 7,28 latin/greek to JIS-7 */
6311 NULL, /* 7,29 latin/greek to Shift-JIS */
6312 NULL, /* 7,30 latin/greek to J-EUC */
6313 NULL, /* 7,31 latin/greek to DEC Kanji */
6314 NULL, /* 7,32 latin/greek to Hebrew-7 */
6315 xlgas, /* 7,33 latin/greek to Latin/Hebrew */
6316 xlgas, /* 7,34 latin/greek to CP862 Hebrew */
6317 xlgeg, /* 7,35 latin/greek to ELOT 927 Greek */
6318 NULL, /* 7,36 latin/greek to Latin/Greek */
6319 xlg69, /* 7,37 latin/greek to CP869 */
6320 xlgas, /* 7,38 latin/greek to Latin-9 */
6321 xlgas, /* 7,39 latin/greek to CP858 */
6322 xleft128, /* 7,40 latin/greek to CP855 */
6323 xleft128, /* 7,41 latin/greek to CP1251 */
6324 xleft128, /* 7,42 latin/greek to Bulgarian */
6325 xleft128, /* 7,43 latin/greek to CP1250 */
6326 xleft128, /* 7,44 latin/greek to Mazovia */
6327 NULL, /* 7,45 latin/greek to UCS-2 */
6328 NULL, /* 7,46 latin/greek to UTF-8 */
6329 NULL, /* 7,47 latin/greek to KOI8R */
6330 NULL, /* 7,48 latin/greek to KOI8U */
6331 xlgw1, /* 7,49 latin/greek to CP1252 */
6332 zl9as, /* 8,0 latin-9 to us ascii */
6333 xl1uk, /* 8,1 latin-9 to uk ascii */
6334 xl1du, /* 8,2 latin-9 to dutch nrc */
6335 xl1fi, /* 8,3 latin-9 to finnish nrc */
6336 xl1fr, /* 8,4 latin-9 to french nrc */
6337 xl1fc, /* 8,5 latin-9 to fr-canadian nrc */
6338 xl1ge, /* 8,6 latin-9 to german nrc */
6339 xl1it, /* 8,7 latin-9 to italian nrc */
6340 xl1hu, /* 8,8 latin-9 to hungarian nrc */
6341 xl1no, /* 8,9 latin-9 to norge/danish nrc */
6342 xl1po, /* 8,10 latin-9 to portuguese nrc */
6343 xl1sp, /* 8,11 latin-9 to spanish nrc */
6344 xl1sw, /* 8,12 latin-9 to swedish nrc */
6345 xl1ch, /* 8,13 latin-9 to swiss nrc */
6346 NULL, /* 8,14 latin-9 to latin-1 */
6347 xl1l2, /* 8,15 latin-9 to latin-2 */
6348 xl9dm, /* 8,16 latin-9 to DEC MCS */
6349 xl9ne, /* 8,17 latin-9 to NeXT */
6350 xl143, /* 8,18 latin-9 to CP437 */
6351 xl185, /* 8,19 latin-9 to CP850 */
6352 xl152, /* 8,20 latin-9 to CP852 */
6353 xl1aq, /* 8,21 latin-9 to Macintosh Latin */
6354 xl1dg, /* 8,22 latin-9 to DGI */
6355 xl1r8, /* 8,23 latin-9 to HP Roman8 */
6356 zl1as, /* 8,24 latin-9 to Latin/Cyrillic */
6357 zl1as, /* 8,25 latin-9 to CP866 */
6358 xl1sk, /* 8,26 latin-9 to Short KOI */
6359 zl1as, /* 8,27 latin-9 to Old KOI-8 Cyrillic */
6360 NULL, /* 8,28 latin-9 to JIS-7 */
6361 NULL, /* 8,29 latin-9 to Shift-JIS */
6362 NULL, /* 8,30 latin-9 to J-EUC */
6363 NULL, /* 8,31 latin-9 to DEC Kanji */
6364 xl1h7, /* 8,32 latin-9 to Hebrew-7 */
6365 xl1lh, /* 8,33 latin-9 to Latin/Hebrew */
6366 xl162, /* 8,34 latin-9 to CP862 Hebrew */
6367 xl1eg, /* 8,35 latin-9 to ELOT 927 Greek */
6368 xl1lg, /* 8,36 latin-9 to Latin/Greek */
6369 xl169, /* 8,37 latin-9 to CP869 */
6370 NULL, /* 8,38 latin-9 to Latin9 */
6371 xl958, /* 8,39 latin-9 to CP858 */
6372 zl1as, /* 8,40 latin-9 to CP855 */
6373 zl1as, /* 8,41 latin-9 to CP1251 */
6374 xl1as, /* 8,42 latin-9 to Bulgarian */
6375 xl91250, /* 8,43 latin-9 to CP1250 */
6376 xl9mz, /* 8,44 latin-9 to Mazovia */
6377 NULL, /* 8,45 latin-9 to UCS-2 */
6378 NULL, /* 8,46 latin-9 to UTF-8 */
6379 zl1as, /* 8,47 latin-9 to KOI8-R */
6380 zl1as, /* 8,48 latin-9 to KOI8-U */
6381 xl9w1, /* 8,49 latin-9 to CP1252 */
6382 NULL, /* 9,00 Unicode... */
6483 int nxlr = (sizeof(xlr) / sizeof(CHAR *));
6486 Translation function table for sending files.
6487 Array of pointers to functions for translating from the local file
6488 character set to the transfer character set. Indexed in the same
6489 way as the xlr array above, but with the indices reversed.
6492 CHAR (*xls[MAXTCSETS+1][MAXFCSETS+1])(CHAR) =
6494 CHAR (*xls[MAXTCSETS+1][MAXFCSETS+1])() =
6495 #endif /* CK_ANSIC */
6497 NULL, /* 0,0 us ascii to transparent */
6498 NULL, /* 0,1 uk ascii to transparent */
6499 NULL, /* 0,2 dutch nrc to transparent */
6500 NULL, /* 0,3 finnish nrc to transparent */
6501 NULL, /* 0,4 french nrc to transparent */
6502 NULL, /* 0,5 fr-canadian nrc to transparent */
6503 NULL, /* 0,6 german nrc to transparent */
6504 NULL, /* 0,7 hungarian nrc to transparent */
6505 NULL, /* 0,8 italian nrc to transparent */
6506 NULL, /* 0,9 norge/danish nrc to transparent */
6507 NULL, /* 0,10 portuguese nrc to transparent */
6508 NULL, /* 0,11 spanish nrc to transparent */
6509 NULL, /* 0,12 swedish nrc to transparent */
6510 NULL, /* 0,13 swiss nrc to transparent */
6511 NULL, /* 0,14 latin-1 to transparent */
6512 NULL, /* 0,15 latin-2 to transparent */
6513 NULL, /* 0,16 DEC MCS to transparent */
6514 NULL, /* 0,17 NeXT to transparent */
6515 NULL, /* 0,18 CP437 to transparent */
6516 NULL, /* 0,19 CP850 to transparent */
6517 NULL, /* 0,20 CP852 to transparent */
6518 NULL, /* 0,21 Macintosh Latin to transparent */
6519 NULL, /* 0,22 DGI to transparent */
6520 NULL, /* 0,23 HP to transparent */
6521 NULL, /* 0,24 Latin/Cyrillic to transparent */
6522 NULL, /* 0,25 CP866 to transparent */
6523 NULL, /* 0,26 Short KOI to transparent */
6524 NULL, /* 0,27 Old KOI-8 to transparent */
6525 NULL, /* 0,28 JIS-7 to transparent */
6526 NULL, /* 0,29 Shift JIS to transparent */
6527 NULL, /* 0,30 Japanese EUC to transparent */
6528 NULL, /* 0,31 DEC Kanji to transparent */
6529 NULL, /* 0,32 Hebrew-7 to transparent */
6530 NULL, /* 0,33 Latin/Hebrew to transparent */
6531 NULL, /* 0,34 CP862 Hebrew to transparent */
6532 NULL, /* 0,35 ELOT 927 Greek to transparent */
6533 NULL, /* 0,36 Latin/Greek to transparent */
6534 NULL, /* 0,37 CP869 to transparent */
6535 NULL, /* 0,38 Latin-9 to transparent */
6536 NULL, /* 0,39 CP858 to transparent */
6537 NULL, /* 0,40 CP855 to transparent */
6538 NULL, /* 0,41 CP1251 to transparent */
6539 NULL, /* 0,42 Bulgarian to transparent */
6540 NULL, /* 0,43 CP1250 to transparent */
6541 NULL, /* 0,44 Mazovia to transparent */
6542 NULL, /* 0,45 UCS-2 to transparent */
6543 NULL, /* 0,46 UTF-8 to transparent */
6544 NULL, /* 0,47 KOI8R to transparent */
6545 NULL, /* 0,48 KOI8U to transparent */
6546 NULL, /* 0,49 CP1252 to transparent */
6547 NULL, /* 1,0 us ascii to ascii */
6548 NULL, /* 1,1 uk ascii to ascii */
6549 xduas, /* 1,2 dutch nrc to ascii */
6550 xfias, /* 1,3 finnish nrc to ascii */
6551 xfras, /* 1,4 french nrc to ascii */
6552 xfcas, /* 1,5 french canadian nrc to ascii */
6553 xgeas, /* 1,6 german nrc to ascii */
6554 xhuas, /* 1,7 hungarian nrc to ascii */
6555 xitas, /* 1,8 italian nrc to ascii */
6556 xnoas, /* 1,9 norwegian/danish nrc to ascii */
6557 xpoas, /* 1,10 portuguese nrc to ascii */
6558 xspas, /* 1,11 spanish nrc to ascii */
6559 xswas, /* 1,12 swedish nrc to ascii */
6560 xchas, /* 1,13 swiss nrc to ascii */
6561 xl1as, /* 1,14 latin-1 to ascii */
6562 xl2as, /* 1,15 latin-2 to ascii */
6563 xdmas, /* 1,16 dec mcs to ascii */
6564 xneas, /* 1,17 NeXT to ascii */
6565 x43as, /* 1,18 CP437 to ascii */
6566 x85as, /* 1,19 CP850 to ascii */
6567 x52as, /* 1,20 CP850 to ascii */
6568 xaqas, /* 1,21 Macintosh Latin to ascii */
6569 xdgas, /* 1,22 DGI to ascii */
6570 xr8as, /* 1,23 HP to ASCII */
6571 xlcas, /* 1,24 Latin/Cyrillic to ASCII */
6572 xacas, /* 1,25 CP866 to ASCII */
6573 xskas, /* 1,26 Short KOI to ASCII */
6574 xk8as, /* 1,27 Old KOI-8 Cyrillic to ASCII */
6579 xh7as, /* 1,32 Hebrew-7 to ASCII */
6580 xlhas, /* 1,33 Latin/Hebrew to ASCII */
6581 x62as, /* 1,34 CP862 Hebrew to ASCII */
6582 xegas, /* 1,35 ELOT 927 Greek to ASCII */
6583 xlgas, /* 1,36 Latin/Greek to ASCII */
6584 x69as, /* 1,37 CP869 to ASCII */
6585 xl9as, /* 1,38 Latin-9 to ASCII */
6586 x58as, /* 1,39 CP858 to ASCII */
6587 x55as, /* 1,40 CP855 to ASCII */
6588 x1251as, /* 1,41 CP1251 to ASCII */
6589 xleft128, /* 1,42 Bulgarian to ASCII */
6590 x1250as, /* 1,43 CP1250 to ASCII */
6591 xmzas, /* 1,44 Mazovia to ASCII */
6592 NULL, /* 1,45 UCS-2 to ASCII */
6593 NULL, /* 1,46 UTF-8 to ASCII */
6594 xk8as, /* 1,47 KOI8R to ASCII */
6595 xk8as, /* 1,48 KOI8U to ASCII */
6596 xw1as, /* 1,49 CP1252 to ASCII */
6597 NULL, /* 2,0 us ascii to latin-1 */
6598 xukl1, /* 2,1 uk ascii to latin-1 */
6599 xdul1, /* 2,2 dutch nrc to latin-1 */
6600 xfil1, /* 2,3 finnish nrc to latin-1 */
6601 xfrl1, /* 2,4 french nrc to latin-1 */
6602 xfcl1, /* 2,5 french canadian nrc to latin-1 */
6603 xgel1, /* 2,6 german nrc to latin-1 */
6604 xhul1, /* 2,7 hungarian nrc to latin-1 */
6605 xitl1, /* 2,8 italian nrc to latin-1 */
6606 xnol1, /* 2,9 norwegian/danish nrc to latin-1 */
6607 xpol1, /* 2,10 portuguese nrc to latin-1 */
6608 xspl1, /* 2,11 spanish nrc to latin-1 */
6609 xswl1, /* 2,12 swedish nrc to latin-1 */
6610 xchl1, /* 2,13 swiss nrc to latin-1 */
6611 NULL, /* 2,14 latin-1 to latin-1 */
6612 xl2l1, /* 2,15 latin-2 to latin-1 */
6613 xdml1, /* 2,16 dec mcs to latin-1 */
6614 xnel1, /* 2,17 NeXT to Latin-1 */
6615 x43l1, /* 2,18 CP437 to Latin-1 */
6616 x85l1, /* 2,19 CP850 to Latin-1 */
6617 x52l1, /* 2,20 CP852 to Latin-1 */
6618 xaql1, /* 2,21 Macintosh Latin to Latin-1 */
6619 xdgl1, /* 2,22 DGI to Latin-1 */
6620 xr8l1, /* 2,23 HP to Latin-1 */
6621 xlcas, /* 2,24 Latin/Cyrillic to Latin-1 */
6622 xacas, /* 2,25 CP866 to Latin-1 */
6623 xskas, /* 2,26 Short KOI to Latin-1 */
6624 xk8as, /* 2,27 Old KOI-8 Cyrillic to Latin-1 */
6625 NULL, /* 2,28 Kanji ... */
6629 xh7as, /* 2,32 Hebrew-7 to Latin-1 */
6630 xlhl1, /* 2,33 Latin/Hebrew to Latin-1 */
6631 x62l1, /* 2,34 CP862 Hebrew to Latin-1 */
6632 xegas, /* 2,35 ELOT 927 Greek to Latin-1 */
6633 xlgl1, /* 2,36 Latin/Greek to Latin-1 */
6634 NULL, /* 2,37 CP869 to Latin-1 */
6635 NULL, /* 2,38 Latin-9 to Latin-1 */
6636 x58l1, /* 2,39 CP858 to Latin-1 */
6637 x55as, /* 2,40 CP855 to Latin-1 */
6638 x1251as, /* 2,41 CP1251 to Latin-1 */
6639 xleft128, /* 2,42 Bulgarian to Latin-1 */
6640 x1250l1, /* 2,43 CP1250 to Latin-1 */
6641 xmzl1, /* 2,44 Mazovia to Latin-1 */
6642 NULL, /* 2,45 UCS-2 to Latin-1 */
6643 NULL, /* 2,46 UTF-8 to Latin-1 */
6644 xk8as, /* 2,47 KOI8R to Latin-1 */
6645 xk8as, /* 2,48 KOI8U to Latin-1 */
6646 xw1l1, /* 2,49 CP1252 to Latin-1 */
6647 NULL, /* 3,0 us ascii to latin-2 */
6648 NULL, /* 3,1 uk ascii to latin-2 */
6649 xduas, /* 3,2 dutch nrc to latin-2 */
6650 xfias, /* 3,3 finnish nrc to latin-2 */
6651 xfras, /* 3,4 french nrc to latin-2 */
6652 xfcas, /* 3,5 french canadian nrc to latin-2 */
6653 xgel2, /* 3,6 german nrc to latin-2 */
6654 xhul2, /* 3,7 hungarian nrc to latin-2 */
6655 xitas, /* 3,8 italian nrc to latin-2 */
6656 xnoas, /* 3,9 norwegian/danish nrc to latin-2 */
6657 xpoas, /* 3,10 portuguese nrc to latin-2 */
6658 xspas, /* 3,11 spanish nrc to latin-2 */
6659 xswas, /* 3,12 swedish nrc to latin-2 */
6660 xchas, /* 3,13 swiss nrc to latin-2 */
6661 xl1l2, /* 3,14 latin-1 to latin-2 */
6662 NULL, /* 3,15 latin-2 to latin-2 */
6663 xl1l2, /* 3,16 dec mcs to latin-2 */
6664 xnel2, /* 3,17 NeXT to Latin-2 */
6665 x43l2, /* 3,18 CP437 to Latin-2 */
6666 x85l2, /* 3,19 CP850 to Latin-2 */
6667 x52l2, /* 3,20 CP852 to Latin-2 */
6668 xaql2, /* 3,21 Macintosh Latin to Latin-2 */
6669 xdgl2, /* 3,22 DGI to Latin-2 */
6670 xr8l2, /* 3,23 HP to Latin-2 */
6671 xlcas, /* 3,24 Latin/Cyrillic to Latin-2 */
6672 xacas, /* 3,25 CP866 to Latin-2 */
6673 xskas, /* 3,26 Short KOI to Latin-2 */
6674 xk8as, /* 3,27 Old KOI-8 Cyrillic to Latin-2 */
6675 NULL, /* 3,28 Kanji ... */
6679 xh7as, /* 3,32 Hebrew-7 to Latin-2 */
6680 xlhas, /* 3,33 Latin/Hebrew to Latin-2 */
6681 x62as, /* 3,34 CP862 Hebrew to Latin-2 */
6682 xegas, /* 3,35 ELOT 927 Greek to Latin-2 */
6683 xl2lg, /* 3,36 Latin/Greek to Latin-2 */
6684 xleft128, /* 3,37 CP869 to Latin-2 */
6685 xl9l2, /* 3,38 Latin-9 to Latin-2 */
6686 x58l2, /* 3,39 CP858 to Latin-2 */
6687 x55as, /* 3,40 CP855 to Latin-2 */
6688 x1251as, /* 3,41 CP1251 to Latin-2 */
6689 xleft128, /* 3,42 Bulgarian to Latin-2 */
6690 x1250l2, /* 3,43 CP1250 to Latin-2 */
6691 xmzl2, /* 3,44 Mazovia to Latin-2 */
6692 NULL, /* 3,45 UCS-2 to Latin-2 */
6693 NULL, /* 3,46 UTF-8 to Latin-2 */
6694 xk8as, /* 3,47 KOI8R to Latin-2 */
6695 xk8as, /* 3,48 KOI8U to Latin-2 */
6696 xw1l2, /* 3,49 CP1252 to latin-2 */
6697 xaslc, /* 4,0 us ascii to latin/cyrillic */
6698 xaslc, /* 4,1 uk ascii to latin/cyrillic */
6699 xduas, /* 4,2 dutch nrc to latin/cyrillic */
6700 xfias, /* 4,3 finnish nrc to latin/cyrillic */
6701 xfras, /* 4,4 french nrc to latin/cyrillic */
6702 xfcas, /* 4,5 french canadian nrc to latin/cyrillic */
6703 xgeas, /* 4,6 german nrc to latin/cyrillic */
6704 xhuas, /* 4,7 hungarian nrc to latin/cyrillic */
6705 xitas, /* 4,8 italian nrc to latin/cyrillic */
6706 xnoas, /* 4,9 norge/danish nrc to latin/cyrillic */
6707 xpoas, /* 4,10 portuguese nrc to latin/cyrillic */
6708 xspas, /* 4,11 spanish nrc to latin/cyrillic */
6709 xswas, /* 4,12 swedish nrc to latin/cyrillic */
6710 xchas, /* 4,13 swiss nrc to latin/cyrillic */
6711 xl1as, /* 4,14 latin-1 to latin/cyrillic */
6712 xl2as, /* 4,15 latin-2 to latin/cyrillic */
6713 xdmas, /* 4,16 dec mcs to latin/cyrillic */
6714 xneas, /* 4,17 NeXT to latin/cyrillic */
6715 x43as, /* 4,18 CP437 to latin/cyrillic */
6716 x85as, /* 4,19 CP850 to latin/cyrillic */
6717 x52as, /* 4,20 CP852 to latin/cyrillic */
6718 xaqas, /* 4,21 Macintosh Latin to latin/cyrillic */
6719 xdgas, /* 4,22 DGI to Latin/Cyrillic */
6720 xr8as, /* 4,23 HP to Latin/Cyrillic */
6721 NULL, /* 4,24 Latin/Cyrillic to Latin/Cyrillic */
6722 xaclc, /* 4,25 CP866 to Latin/Cyrillic */
6723 xskcy, /* 4,26 Short KOI to Latin/Cyrillic */
6724 xk8lc, /* 4,27 Old KOI-8 Cyrillic to Latin/Cyrillic */
6725 NULL, /* 4,28 Kanji... */
6729 xh7as, /* 4,32 Hebrew-7 to Latin/Cyrillic */
6730 xlhas, /* 4,33 Latin/Hebrew to Latin/Cyrillic */
6731 x62as, /* 4,34 CP862 Hebrew to Latin/Cyrillic */
6732 xegas, /* 4,35 ELOT 927 Greek to Latin/Cyrillic */
6733 xleft160, /* 4,36 Latin/Greek to Latin/Cyrillic */
6734 xleft128, /* 4,37 CP869 to Latin/Cyrillic */
6735 xl1as, /* 4,38 latin-9 to latin/cyrillic */
6736 xleft128, /* 4,39 CP858 to Latin/Cyrillic */
6737 x55lc, /* 4,40 CP855 to Latin/Cyrillic */
6738 x1251lc, /* 4,41 CP1251 to Latin/Cyrillic */
6739 xbulc, /* 4,42 Bulgarian to Latin/Cyrillic */
6740 x1250as, /* 4,43 CP1250 to Latin/Cyrillic */
6741 xmzas, /* 4,44 Mazovia to Latin/Cyrillic */
6742 NULL, /* 4,45 UCS-2 to Latin/Cyrillic */
6743 NULL, /* 4,46 UTF-8 to Latin/Cyrillic */
6744 xkrlc, /* 4,47 KOI8R to Latin/Cyrillic */
6745 xkulc, /* 4,48 KOI8U to Latin/Cyrillic */
6746 xw1lc, /* 4,49 CP1252 to Latin/Cyrillic */
6797 NULL, /* 6,0 us ascii to Latin/Hebrew */
6798 NULL, /* 6,1 uk ascii to Latin/Hebrew */
6799 xduas, /* 6,2 dutch nrc to Latin/Hebrew */
6800 xfias, /* 6,3 finnish nrc to Latin/Hebrew */
6801 xfras, /* 6,4 french nrc to Latin/Hebrew */
6802 xfcas, /* 6,5 french canadian nrc to Latin/Hebrew */
6803 xgeas, /* 6,6 german nrc to Latin/Hebrew */
6804 xhuas, /* 6,7 hungarian nrc to Latin/Hebrew */
6805 xitas, /* 6,8 italian nrc to Latin/Hebrew */
6806 xnoas, /* 6,9 norge/danish nrc to Latin/Hebrew */
6807 xpoas, /* 6,10 portuguese nrc to Latin/Hebrew */
6808 xspas, /* 6,11 spanish nrc to Latin/Hebrew */
6809 xswas, /* 6,12 swedish nrc to Latin/Hebrew */
6810 xchas, /* 6,13 swiss nrc to Latin/Hebrew */
6811 xl1lh, /* 6,14 latin-1 to Latin/Hebrew */
6812 xl2as, /* 6,15 latin-2 to Latin/Hebrew */
6813 xdmas, /* 6,16 dec mcs to Latin/Hebrew */
6814 xneas, /* 6,17 NeXT to Latin/Hebrew */
6815 x43as, /* 6,18 CP437 to Latin/Hebrew */
6816 x85as, /* 6,19 CP850 to Latin/Hebrew */
6817 x52as, /* 6,20 CP852 to Latin/Hebrew */
6818 xaqas, /* 6,21 Macintosh Latin to Latin/Hebrew */
6819 xdgas, /* 6,22 DGI to Latin/Hebrew */
6820 xr8as, /* 6,23 HP to Latin/Hebrew */
6821 xlcas, /* 6,24 Latin/Cyrillic to Latin/Hebrew */
6822 xacas, /* 6,25 CP866 to Latin/Hebrew */
6823 xskas, /* 6,26 Short KOI to Latin/Hebrew */
6824 xk8as, /* 6,27 Old KOI-8 Cyrillic to Latin/Hebrew */
6825 NULL, /* 6,28 Kanji... */
6829 xh7lh, /* 6,32 Hebrew-7 to Latin/Hebrew */
6830 NULL, /* 6,33 Latin/Hebrew to Latin/Hebrew */
6831 x62lh, /* 6,34 CP862 Hebrew to Latin/Hebrew */
6832 xegas, /* 6,35 ELOT 927 Greek to Latin/Hebrew */
6833 xlgas, /* 6,36 Latin/Greek to Latin/Hebrew */
6834 x69as, /* 6,37 CP869 to Latin/Hebrew */
6835 xl1as, /* 6,38 latin-9 to Latin/Hebrew */
6836 x58as, /* 6,39 CP858 to Latin/Hebrew */
6837 x55as, /* 6,40 CP855 to Latin/Hebrew */
6838 x1251as, /* 6,41 CP1251 to Latin/Hebrew */
6839 xleft128, /* 6,42 Bulgarian to Latin/Hebrew */
6840 x1250as, /* 6,43 CP1250 to Latin/Hebrew */
6841 xmzas, /* 6,44 Mazovia to Latin/Hebrew */
6842 NULL, /* 6,45 UCS-2 to Latin/Hebrew */
6843 NULL, /* 6,46 UTF-8 to Latin/Hebrew */
6844 NULL, /* 6,47 KOI8R to Latin/Hebrew */
6845 NULL, /* 6,48 KOI8U to Latin/Hebrew */
6846 xw1lh, /* 6,49 CP1252 to Latin/Hebrew */
6847 NULL, /* 7,0 us ascii to Latin/Greek */
6848 NULL, /* 7,1 uk ascii to Latin/Greek */
6849 xduas, /* 7,2 dutch nrc to Latin/Greek */
6850 xfias, /* 7,3 finnish nrc to Latin/Greek */
6851 xfras, /* 7,4 french nrc to Latin/Greek */
6852 xfcas, /* 7,5 french canadian nrc to Latin/Greek */
6853 xgeas, /* 7,6 german nrc to Latin/Greek */
6854 xhuas, /* 7,7 hungarian nrc to Latin/Greek */
6855 xitas, /* 7,8 italian nrc to Latin/Greek */
6856 xnoas, /* 7,9 norge/danish nrc to Latin/Greek */
6857 xpoas, /* 7,10 portuguese nrc to Latin/Greek */
6858 xspas, /* 7,11 spanish nrc to Latin/Greek */
6859 xswas, /* 7,12 swedish nrc to Latin/Greek */
6860 xchas, /* 7,13 swiss nrc to Latin/Greek */
6861 xl1lg, /* 7,14 latin-1 to Latin/Greek */
6862 xl2lg, /* 7,15 latin-2 to Latin/Greek */
6863 xl1lg, /* 7,16 dec mcs to Latin/Greek */
6864 xneas, /* 7,17 NeXT to Latin/Greek */
6865 xleft128, /* 7,18 CP437 to Latin/Greek */
6866 x85as, /* 7,19 CP850 to Latin/Greek */
6867 x52as, /* 7,20 CP852 to Latin/Greek */
6868 xaqas, /* 7,21 Macintosh Latin to Latin/Greek */
6869 xdgas, /* 7,22 DGI to Latin/Greek */
6870 xr8as, /* 7,23 HP to Latin/Greek */
6871 xleft160, /* 7,24 Latin/Cyrillic to Latin/Greek */
6872 xleft128, /* 7,25 CP866 to Latin/Greek */
6873 xskas, /* 7,26 Short KOI to Latin/Greek */
6874 xk8as, /* 7,27 Old KOI-8 Cyrillic to Latin/Greek */
6875 NULL, /* 7,28 Kanji... */
6879 xh7as, /* 7,32 Hebrew-7 to Latin/Greek */
6880 NULL, /* 7,33 Latin/Hebrew to Latin/Greek */
6881 x62as, /* 7,34 CP862 Hebrew to Latin/Greek */
6882 xeglg, /* 7,35 ELOT 927 Greek to Latin/Greek */
6883 NULL, /* 7,36 Latin/Greek to Latin/Greek */
6884 x69lg, /* 7,37 CP869 to Latin/Greek */
6885 xl1as, /* 7,38 latin-9 to Latin/Greek */
6886 xl1as, /* 7,39 latin-9 to Latin/Hebrew*/
6887 xleft128, /* 7,40 CP855 to Latin/Greek */
6888 xleft128, /* 7,41 CP1251 to Latin/Greek */
6889 xleft128, /* 7,42 Bulgarian to Latin/Greek */
6890 x1250as, /* 7,43 CP1250 to Latin/Greek */
6891 xmzas, /* 7,44 Mazovia to Latin/Greek */
6892 NULL, /* 7,45 UCS-2 to Latin/Greek */
6893 NULL, /* 7,46 UTF-8 to Latin/Greek */
6894 NULL, /* 7,47 KOI8R to Latin/Greek */
6895 NULL, /* 7,48 KOI8U to Latin/Greek */
6896 xw1lg, /* 7,49 CP1252 to Latin/Greek */
6897 NULL, /* 8,0 us ascii to latin-9 */
6898 xukl1, /* 8,1 uk ascii to latin-9 */
6899 xdul1, /* 8,2 dutch nrc to latin-9 */
6900 xfil1, /* 8,3 finnish nrc to latin-9 */
6901 xfrl1, /* 8,4 french nrc to latin-9 */
6902 xfcl1, /* 8,5 french canadian nrc to latin-9 */
6903 xgel1, /* 8,6 german nrc to latin-9 */
6904 xhul1, /* 8,7 hungarian nrc to latin-9 */
6905 xitl1, /* 8,8 italian nrc to latin-9 */
6906 xnol1, /* 8,9 norwegian/danish nrc to latin-9 */
6907 xpol1, /* 8,10 portuguese nrc to latin-9 */
6908 xspl1, /* 8,11 spanish nrc to latin-9 */
6909 xswl1, /* 8,12 swedish nrc to latin-9 */
6910 xchl1, /* 8,13 swiss nrc to latin-9 */
6911 NULL, /* 8,14 latin-1 to latin-9 */
6912 xl2l9, /* 8,15 latin-2 to latin-9 */
6913 xdml9, /* 8,16 dec mcs to latin-9 */
6914 xnel9, /* 8,17 NeXT To Latin-9 */
6915 x43l1, /* 8,18 CP437 To Latin-9 */
6916 x85l1, /* 8,19 CP850 To Latin-9 */
6917 x52l1, /* 8,20 CP852 To Latin-9 */
6918 xaql1, /* 8,21 Macintosh Latin To Latin-9 */
6919 xdgl1, /* 8,22 DGI To Latin-9 */
6920 xr8l1, /* 8,23 HP To Latin-9 */
6921 xlcas, /* 8,24 Latin/Cyrillic To Latin-9 */
6922 xacas, /* 8,25 CP866 To Latin-9 */
6923 xskas, /* 8,26 Short KOI To Latin-9 */
6924 xk8as, /* 8,27 Old KOI-8 Cyrillic To Latin-9 */
6925 NULL, /* 8,28 Kanji ... */
6929 xh7as, /* 8,32 Hebrew-7 To Latin-9 */
6930 xlhl1, /* 8,33 Latin/Hebrew To Latin-9 */
6931 x62l1, /* 8,34 CP862 Hebrew To Latin-9 */
6932 xegas, /* 8,35 ELOT 927 Greek To Latin-9 */
6933 xlgl1, /* 8,36 Latin/Greek To Latin-9 */
6934 xl169, /* 8,37 CP869 To Latin-9 */
6935 NULL, /* 8,38 Latin-9 To Latin-9 */
6936 x58l9, /* 8,39 cp858 To Latin-9 */
6937 x55as, /* 8,40 cp855 To Latin-9 */
6938 x55as, /* 8,41 cp1251 To Latin-9 */
6939 xleft128, /* 8,42 Bulgarian To Latin-9 */
6940 x1250l9, /* 8,43 CP1250 To Latin-9 */
6941 xmzl9, /* 8,44 Mazovia To Latin-9 */
6942 NULL, /* 8,45 UCS-2 to Latin-9 */
6943 NULL, /* 8,46 UTF-8 to Latin-9 */
6944 NULL, /* 8,47 KOI8R to Latin-9 */
6945 NULL, /* 8,48 KOI8U to Latin-9 */
6946 xw1l9, /* 8,49 CP1252 to Latin-9 */
6947 NULL, /* 9,00 Unicode... */
7048 int nxls = (sizeof(xls) / sizeof(CHAR *));
7052 The following routines are useful only for terminal character sets, and so
7053 ifdef'd out for NOLOCAL compilations.
7059 Returns nonzero if argument indicates a 7-bit national character set,
7063 cs_is_nrc(x) int x; {
7065 if (x == TX_J201R || x == TX_DECSPEC || x == TX_DECTECH
7066 || txrinfo[x] == NULL)
7069 return(txrinfo[x]->flags & X2U_STD && txrinfo[x]->size == 94);
7071 if ((cs_size(x) == 94))
7075 #endif /* UNICODE */
7081 Returns nonzero if argument indicates an ISO 4873-standard-format
7082 character set, i.e. one in which the control region is NOT used for
7083 graphics; zero otherwise.
7086 cs_is_std(x) int x; {
7088 if (!txrinfo[x]) /* Even more safety */
7090 else if (txrinfo[x]->size == 128) /* Just for safety */
7093 return(txrinfo[x]->flags & X2U_STD); /* Only this should be needed */
7096 case FC_CP437: /* Code pages use C1 graphics */
7103 case FC_APPQD: /* So do Apple and NeXTSTEP */
7106 default: /* Others behave */
7109 #endif /* CKOUINI */
7117 return(txrinfo[x]->size);
7174 #endif /* UNICODE */
7176 #endif /* NOLOCAL */
7179 S E T X L A T Y P E -- Set Translation Type
7181 Sets global xlatype to indicate which kind of translation:
7183 XLA_NONE No translation
7184 XLA_BYTE Byte-for-Byte translation
7185 XLA_JAPAN Japanese Kanji translation
7186 XLA_UNICODE Unicode translations
7188 And sets up the appropriate translation function pointers as follows:
7191 All function pointers are NULL.
7193 For Byte-for-Byte transation:
7194 rx = TCS to FCS (these functions are in this module...)
7197 For Unicode translations:
7198 xfu = FCS to UCS (these functions are in ckcuni.c...)
7204 setxlatype(tcs, fcs) int tcs, fcs; {
7206 xfu = NULL; /* Unicode <-> TCS/FCS functions */
7210 #endif /* UNICODE */
7212 debug(F101,"setxlatype fcs","",fcs);
7213 debug(F101,"setxlatype tcs","",tcs);
7215 if (tcs < 0 || tcs > MAXTCSETS) {
7216 debug(F101,"setxlatype bad tcs","",tcs);
7219 if (fcs < 0 || fcs > MAXFCSETS) {
7220 debug(F101,"setxlatype bad fcs","",fcs);
7223 if (tcs == TC_TRANSP || xfrxla == 0) { /* Transfer charset TRANSPARENT */
7224 debug(F101,"setxlatype transparent because TCS==Transparent","",tcs);
7225 xlatype = XLA_NONE; /* Translation type is None */
7227 /* If any of our charsets is Unicode we use Unicode functions */
7228 /* even if TCS and FCS are the same because of BOM and byte swapping */
7229 } else if (tcs == TC_UCS2 || tcs == TC_UTF8 ||
7230 fcs == FC_UCS2 || fcs == FC_UTF8) {
7231 debug(F101,"setxlatype Unicode tcs","",tcs);
7232 debug(F101,"setxlatype Unicode fcs","",fcs);
7233 /* Unicode <-> TCS/FCS functions */
7234 xfu = xl_fcu[fcs]; /* FCS -> UCS */
7235 xtu = xl_tcu[tcs]; /* TCS -> UCS */
7236 xuf = xl_ufc[fcs]; /* UCS -> FCS */
7237 xut = xl_utc[tcs]; /* UCS -> TCS */
7238 xlatype = XLA_UNICODE; /* Translation type is Unicode */
7240 /* These make trouble in 64-bit land */
7241 debug(F001,"setxlatype Unicode xfu","",(unsigned)xfu);
7242 debug(F001,"setxlatype Unicode xuf","",(unsigned)xuf);
7243 #endif /* COMMENT */
7244 #endif /* UNICODE */
7245 } else if (cseqtab[tcs] == fcs) { /* Or if TCS == FCS */
7246 debug(F101,"setxlatype transparent because TCS==FCS","",tcs);
7247 xlatype = XLA_NONE; /* translation type is also None */
7249 /* Otherwise if any of them is Japanese, we use Kanji functions */
7250 } else if (tcs == TC_JEUC || fcsinfo[fcs].alphabet == AL_JAPAN) {
7251 debug(F101,"setxlatype Japanese tcs","",tcs);
7252 debug(F101,"setxlatype Japanese fcs","",fcs);
7253 xlatype = XLA_JAPAN; /* Translation type is Japanese */
7255 /* Otherwise we use byte functions */
7256 } else { /* Otherwise... */
7257 rx = xlr[tcs][fcs]; /* Input translation function */
7258 sx = xls[tcs][fcs]; /* Output translation function */
7259 debug(F101,"setxlatype Byte tcs","",tcs);
7260 debug(F101,"setxlatype Byte fcs","",fcs);
7261 xlatype = XLA_BYTE; /* Translation type is Byte */
7263 debug(F101,"setxlatype xlatype","",xlatype);
7266 /* Set up translation between two file character sets with UCS intermediate */
7270 initxlate(csin, csout) int csin, csout; {
7276 debug(F101,"initxlate csin","",csin);
7277 debug(F101,"initxlate csout","",csout);
7279 if (csin < 0 || csin > MAXFCSETS) {
7280 debug(F101,"initxlate bad csin","",csin);
7283 if (csout < 0 || csout > MAXFCSETS) {
7284 debug(F101,"initxlate bad csout","",csout);
7287 if (csin == csout && csin != FC_UCS2) {
7288 xlatype = XLA_NONE; /* Translation type is None */
7291 xlatype = XLA_UNICODE; /* Translation type is Unicode */
7292 xfu = xl_fcu[csin]; /* FCS -> UCS */
7293 xuf = xl_ufc[csout]; /* UCS -> FCS */
7294 xpnbyte(-1,0,0,NULL); /* Reset UCS-2 */
7296 debug(F001,"initxlate Unicode xfu","",(unsigned)xfu);
7297 debug(F001,"initxlate Unicode xuf","",(unsigned)xuf);
7298 #endif /* COMMENT */
7299 debug(F101,"initxlate xlatype","",xlatype);
7301 #endif /* UNICODE */
7303 int csetsinited = 0;
7306 initcsets() { /* Routine to reset or initialize */
7307 int i; /* character-set associations. */
7310 if (ucsorder < 0) /* For creating UCS-2 files. */
7311 ucsorder = byteorder;
7314 if (fileorder < 0) /* For reading UCS-2 files. */
7315 fileorder = ucsorder;
7316 #endif /* UNICODE */
7318 debug(F101,"initcsets nxls","",nxls);
7319 debug(F101,"initcsets nxlr","",nxlr);
7321 debug(F101,"initcsets TERM LOCAL CSET","",tcsl);
7322 debug(F101,"initcsets TERM REMOTE CSET","",tcsr);
7324 for (i = 0; i <= MAXFCSETS; i++) /* First clear them all... */
7326 for (i = 0; i <= MAXTCSETS; i++)
7329 /* Now set specific defaults for incoming files */
7333 axcset[TC_TRANSP] = FC_TRANSP;
7334 axcset[TC_USASCII] = FC_USASCII;
7342 axcset[TC_1LATIN] = fcharset;
7345 axcset[TC_1LATIN] = FC_CP850;
7349 axcset[TC_1LATIN] = FC_HPR8;
7352 axcset[TC_1LATIN] = FC_DECMCS;
7355 axcset[TC_1LATIN] = FC_NEXT;
7358 axcset[TC_1LATIN] = FC_DGMCS;
7360 /* Should we use code pages on some PC based UNIXes? */
7361 axcset[TC_1LATIN] = FC_1LATIN;
7362 #endif /* datageneral */
7369 axcset[TC_2LATIN] = FC_CP852;
7370 axcset[TC_CYRILL] = FC_CP866;
7371 axcset[TC_JEUC] = FC_SHJIS;
7372 axcset[TC_HEBREW] = FC_CP862;
7373 axcset[TC_GREEK] = FC_CP869;
7374 axcset[TC_9LATIN] = FC_CP858;
7375 axcset[TC_UCS2] = FC_UCS2;
7376 axcset[TC_UTF8] = FC_UCS2;
7378 axcset[TC_2LATIN] = FC_2LATIN;
7379 axcset[TC_CYRILL] = FC_CYRILL;
7380 axcset[TC_JEUC] = FC_JEUC;
7381 axcset[TC_HEBREW] = FC_HEBREW;
7382 axcset[TC_GREEK] = FC_GREEK;
7383 axcset[TC_9LATIN] = FC_9LATIN;
7384 axcset[TC_UCS2] = FC_UTF8;
7385 axcset[TC_UTF8] = FC_UTF8;
7388 /* And for outbound files */
7390 afcset[FC_USASCII] = TC_USASCII;
7391 afcset[FC_UKASCII] = TC_1LATIN;
7392 afcset[FC_DUASCII] = TC_1LATIN;
7393 afcset[FC_FIASCII] = TC_1LATIN;
7394 afcset[FC_FRASCII] = TC_1LATIN;
7395 afcset[FC_FCASCII] = TC_1LATIN;
7396 afcset[FC_GEASCII] = TC_1LATIN;
7397 afcset[FC_HUASCII] = TC_2LATIN;
7398 afcset[FC_ITASCII] = TC_1LATIN;
7399 afcset[FC_NOASCII] = TC_1LATIN;
7400 afcset[FC_POASCII] = TC_1LATIN;
7401 afcset[FC_SPASCII] = TC_1LATIN;
7402 afcset[FC_SWASCII] = TC_1LATIN;
7403 afcset[FC_CHASCII] = TC_1LATIN;
7404 afcset[FC_1LATIN] = TC_1LATIN;
7405 afcset[FC_2LATIN] = TC_2LATIN;
7406 afcset[FC_DECMCS] = TC_1LATIN;
7407 afcset[FC_NEXT] = TC_1LATIN;
7408 afcset[FC_CP437] = TC_1LATIN;
7409 afcset[FC_CP850] = TC_1LATIN;
7410 afcset[FC_CP852] = TC_2LATIN;
7411 afcset[FC_APPQD] = TC_1LATIN;
7412 afcset[FC_DGMCS] = TC_1LATIN;
7413 afcset[FC_HPR8] = TC_1LATIN;
7414 afcset[FC_CYRILL] = TC_CYRILL;
7415 afcset[FC_CP866] = TC_CYRILL;
7416 afcset[FC_KOI7] = TC_CYRILL;
7417 afcset[FC_KOI8] = TC_CYRILL;
7418 afcset[FC_JIS7] = TC_JEUC;
7419 afcset[FC_SHJIS] = TC_JEUC;
7420 afcset[FC_JEUC] = TC_JEUC;
7421 afcset[FC_JDEC] = TC_JEUC;
7422 afcset[FC_HE7] = TC_HEBREW;
7423 afcset[FC_HEBREW] = TC_HEBREW;
7424 afcset[FC_CP862] = TC_HEBREW;
7425 afcset[FC_ELOT] = TC_GREEK;
7426 afcset[FC_GREEK] = TC_GREEK;
7427 afcset[FC_CP869] = TC_GREEK;
7428 afcset[FC_9LATIN] = TC_9LATIN;
7429 afcset[FC_CP923] = TC_9LATIN;
7430 afcset[FC_CP858] = TC_9LATIN;
7431 afcset[FC_CP855] = TC_CYRILL;
7432 afcset[FC_CP1251] = TC_CYRILL;
7433 afcset[FC_BULGAR] = TC_CYRILL;
7434 afcset[FC_CP1250] = TC_2LATIN;
7435 afcset[FC_MAZOVIA] = TC_2LATIN;
7436 afcset[FC_UCS2] = TC_UTF8;
7437 afcset[FC_UTF8] = TC_UTF8;
7439 afcset[FC_KOI8R] = TC_CYRILL;
7440 afcset[FC_KOI8U] = TC_CYRILL;
7441 afcset[FC_CP1252] = TC_1LATIN;
7446 #endif /* NOCSETS */