3 #include "ckcdeb.h" /* Includes... */
13 char *xlav = "Character Set Translation 9.0.044, 2 Jun 2011";
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, 2011,
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,
207 "iso-10646-ucs-2", TC_UCS2, CM_INV, /* ISO 10646 / Unicode UCS-2 */
209 "iso-8859-1", TC_1LATIN, CM_INV, /* ISO Latin Alphabet 1 */
210 "iso-8859-15", TC_9LATIN, CM_INV, /* ISO Latin Alphabet 9 (yes) */
211 "iso-8859-2", TC_2LATIN, CM_INV, /* ISO Latin Alphabet 2 */
213 "iso-8859-5", TC_CYRILL, CM_INV, /* ISO Latin/Cyrillic Alphabet */
214 #endif /* CYRILLIC */
216 "iso-8859-7", TC_GREEK, CM_INV, /* ISO 8859-7 Latin/Greek */
219 "iso-8859-8", TC_HEBREW, CM_INV, /* ISO Latin/Hebrew */
223 "japanese-euc", TC_JEUC, CM_INV,
225 "l", TC_1LATIN, CM_ABR|CM_INV,
226 "la", TC_1LATIN, CM_ABR|CM_INV,
227 "lat", TC_1LATIN, CM_ABR|CM_INV,
228 "lati", TC_1LATIN, CM_ABR|CM_INV,
229 "latin", TC_1LATIN, CM_ABR|CM_INV,
230 "latin1-iso", TC_1LATIN, 0,
232 "latin2-iso", TC_2LATIN, 0,
234 "latin9-iso", TC_9LATIN, 0,
235 "transparent", TC_TRANSP, 0,
239 "us-ascii", TC_USASCII, CM_INV,
240 "usascii", TC_USASCII, CM_INV,
242 "utf-8", TC_UTF8, CM_INV,
247 int ntcs = (sizeof(tcstab) / sizeof(struct keytab)) - 1;
249 /* File character set information structure, indexed by character set code, */
250 /* as defined in ckuxla.h. This table must be in order of file character */
253 struct csinfo fcsinfo[] = { /* File character set information... */
254 /* Descriptive Name Size Designator */
255 "US ASCII", 128, FC_USASCII, NULL, AL_ROMAN, "ascii",
256 "British/UK ISO-646", 128, FC_UKASCII, NULL, AL_ROMAN, "british",
257 "Dutch ISO-646", 128, FC_DUASCII, NULL, AL_ROMAN, "dutch",
258 "Finnish ISO-646", 128, FC_FIASCII, NULL, AL_ROMAN, "finnish",
259 "French ISO-646", 128, FC_FRASCII, NULL, AL_ROMAN, "french",
260 "Canadian-French NRC", 128, FC_FCASCII, NULL, AL_ROMAN, "canadian-french",
261 "German ISO-646", 128, FC_GEASCII, NULL, AL_ROMAN, "german",
262 "Hungarian ISO-646", 128, FC_HUASCII, NULL, AL_ROMAN, "hungarian",
263 "Italian ISO-646", 128, FC_ITASCII, NULL, AL_ROMAN, "italian",
264 "Norwegian/Danish ISO-646",128,FC_NOASCII,NULL,AL_ROMAN,"norwegian/danish",
265 "Portuguese ISO-646", 128, FC_POASCII, NULL, AL_ROMAN,"portuguese",
266 "Spanish ISO-646", 128, FC_SPASCII, NULL, AL_ROMAN, "spanish",
267 "Swedish ISO-646", 128, FC_SWASCII, NULL, AL_ROMAN, "swedish",
268 "Swiss NRC", 128, FC_CHASCII, NULL, AL_ROMAN, "swiss",
269 "ISO 8859-1 Latin-1", 256, FC_1LATIN, NULL, AL_ROMAN,"latin1-iso",
270 "ISO 8859-2 Latin-2", 256, FC_2LATIN, NULL, AL_ROMAN,"latin2-iso",
271 "DEC Multinational", 256, FC_DECMCS, NULL,AL_ROMAN,"dec-multinational",
272 "NeXT Multinational", 256, FC_NEXT, NULL,AL_ROMAN,"next-multinational",
273 "PC Code Page 437", 256, FC_CP437, NULL, AL_ROMAN,"cp437",
274 "PC Code Page 850", 256, FC_CP850, NULL, AL_ROMAN,"cp850",
275 "PC Code Page 852", 256, FC_CP852, NULL, AL_ROMAN,"cp852",
276 "Apple Macintosh Latin", 256, FC_APPQD, NULL, AL_ROMAN,"macintosh-latin",
277 "Data General International",256,FC_DGMCS,NULL,AL_ROMAN,"dg-international",
278 "Hewlett Packard Roman8", 256, FC_HPR8, NULL, AL_ROMAN, "hp-roman8",
279 "ISO 8859-5 Latin/Cyrillic", 256, FC_CYRILL, NULL, AL_CYRIL,"cyrillic-iso",
280 "CP866 Cyrillic", 256, FC_CP866, NULL, AL_CYRIL,"cp866",
281 "Short KOI", 128, FC_KOI7, NULL, AL_CYRIL,"short-koi",
282 "Old KOI-8 Cyrillic", 256, FC_KOI8, NULL, AL_CYRIL,"koi8-cyrillic",
283 "Japanese JIS7", 16384, FC_JIS7, NULL, AL_JAPAN, "jis7-kanji",
284 "Japanese Shift JIS", 16384, FC_SHJIS, NULL, AL_JAPAN, "shift-jis-kanji",
285 "Japanese EUC", 16384, FC_JEUC, NULL, AL_JAPAN, "euc-jp",
286 "Japanese DEC Kanji", 16384, FC_JDEC, NULL, AL_JAPAN, "dec-kanji",
287 "Hebrew-7 DEC", 128, FC_HE7, NULL, AL_HEBREW, "hebrew-7",
288 "ISO 8859-8 Latin/Hebrew",256, FC_HEBREW, NULL, AL_HEBREW, "hebrew-iso",
289 "CP862 Hebrew", 256, FC_CP862, NULL, AL_HEBREW, "cp862-hebrew",
290 "ELOT 927 Greek", 128, FC_ELOT, NULL, AL_GREEK, "elot927-greek",
291 "ISO 8859-7 Latin/Greek", 256, FC_GREEK, NULL, AL_GREEK, "greek-iso",
292 "CP869 Greek", 256, FC_CP869, NULL, AL_GREEK, "cp869-greek",
293 "ISO 8859-15 Latin-9", 256, FC_9LATIN, NULL, AL_ROMAN, "latin9-iso",
294 "PC Code Page 858", 256, FC_CP850, NULL, AL_ROMAN, "cp858",
295 "PC Code Page 855", 256, FC_CP855, NULL, AL_CYRIL, "cp855-cyrillic",
296 "Windows Code Page 1251", 256, FC_CP1251, NULL, AL_CYRIL, "cp1251-cyrillic",
297 "Bulgarian PC Code Page", 256, FC_BULGAR, NULL, AL_CYRIL, "bulgaria-pc",
298 "Windows Code Page 1250", 256, FC_CP1250, NULL, AL_ROMAN, "cp1250",
299 "Polish Mazovia PC Code Page", 256, FC_MAZOVIA, NULL, AL_ROMAN, "mazovia-pc",
300 "ISO 10646 / Unicode UCS-2", 64000, FC_UCS2, NULL, AL_UNIV, "ucs2",
301 "ISO 10646 / Unicode UTF-8", 64000, FC_UCS2, NULL, AL_UNIV, "utf8",
302 "KOI8-R Russian+Boxdrawing",256, FC_KOI8R, NULL, AL_CYRIL,"koi8r",
303 "KOI8-U Ukrainian+Boxdrawing",256,FC_KOI8U, NULL, AL_CYRIL,"koi8u",
304 "Windows Code Page 1252", 256, FC_CP1252, NULL, AL_ROMAN, "cp1252",
308 /* Local file character sets */
309 /* Includes 7-bit National Replacement Character Sets of ISO 646 */
310 /* Plus ISO Latin-1, DEC Multinational Character Set (MCS), NeXT char set, */
311 /* Various PC and Windows code pages, etc. */
312 /* As of C-Kermit 9.0 MIME names are included as invisible synomyms for */
313 /* those character sets that have MIME names. */
315 struct keytab fcstab[] = { /* Keyword table for 'set file character-set' */
317 IMPORTANT: This table is replicated below as ttcstab (terminal character
318 set table). The only differences are the addition of TRANSPARENT
319 and the removal of the Kanji sets, which are not supported for terminal
320 emulation. If you make changes to this table, also change ttcstab.
323 /* Keyword Value Flags */
324 "apple-quickdraw", FC_APPQD, CM_INV, /* Apple Quickdraw */
325 "ascii", FC_USASCII, 0, /* ASCII */
326 "british", FC_UKASCII, 0, /* British NRC */
327 "bulgaria-pc", FC_BULGAR, 0, /* Bulgarian PC Code Page */
328 "canadian-french", FC_FCASCII, 0, /* French Canadian NRC */
330 "cp1250", FC_CP1250, 0, /* Windows CP 1250 */
333 "cp1251-cyrillic", FC_CP1251, 0, /* Windows CP 1251 */
334 #endif /* CYRILLIC */
335 "cp1252", FC_CP1252, 0, /* Windows CP 1252 */
336 "cp437", FC_CP437, 0, /* PC CP437 */
337 "cp850", FC_CP850, 0, /* PC CP850 */
339 "cp852", FC_CP852, 0, /* PC CP852 */
342 "cp855-cyrillic", FC_CP855, 0, /* PC CP855 */
343 #endif /* CYRILLIC */
344 "cp858", FC_CP858, 0, /* PC CP858 */
346 "cp862-hebrew", FC_CP862, 0, /* PC CP862 */
349 "cp866-cyrillic", FC_CP866, 0, /* CP866 Cyrillic */
350 #endif /* CYRILLIC */
352 "cp869-greek", FC_CP869, 0, /* CP869 Greek */
355 "cyrillic-iso", FC_CYRILL, 0, /* ISO Latin/Cyrillic Alphabet */
356 #endif /* CYRILLIC */
357 "danish", FC_NOASCII, 0, /* Norwegian and Danish NRC */
359 "dec-kanji", FC_JDEC, 0, /* Japanese DEC Kanji */
361 "dec-mcs", FC_DECMCS, CM_INV, /* DEC multinational char set */
362 "dec-multinational", FC_DECMCS, 0, /* DEC multinational character set */
363 "dg-international", FC_DGMCS, 0, /* Data General multinational */
364 "dutch", FC_DUASCII, 0, /* Dutch NRC */
366 "elot927-greek", FC_ELOT, 0, /* ELOT 927 Greek */
367 "elot928-greek", FC_GREEK, 0, /* Same as ISO 8859-7 Latin/Greek */
370 "euc-jp", FC_JEUC, 0, /* Japanese EUC */
372 "finnish", FC_FIASCII, 0, /* Finnish NRC */
373 "french", FC_FRASCII, 0, /* French NRC */
374 "fr-canadian", FC_FCASCII, CM_INV, /* French Canadian NRC */
375 "german", FC_GEASCII, 0, /* German NRC */
377 "greek-iso", FC_GREEK, 0, /* ISO 8859-7 Latin/Greek */
380 "he", FC_HEBREW, CM_ABR|CM_INV,
381 "heb", FC_HEBREW, CM_ABR|CM_INV,
382 "hebr", FC_HEBREW, CM_ABR|CM_INV,
383 "hebre", FC_HEBREW, CM_ABR|CM_INV,
384 "hebrew", FC_HEBREW, CM_ABR|CM_INV,
385 "hebrew-7", FC_HE7, 0, /* DEC 7-Bit Hebrew */
386 "hebrew-iso", FC_HEBREW, 0, /* ISO Latin/Hebrew */
388 "hp-roman8", FC_HPR8, 0, /* Hewlett Packard Roman8 */
389 "hungarian", FC_HUASCII, 0, /* Hungarian NRC */
391 "ibm437", FC_CP437, CM_INV, /* PC CP437 */
392 "ibm850", FC_CP850, CM_INV, /* PC CP850 (not in MIME) */
394 "ibm852", FC_CP852, CM_INV, /* PC CP852 */
397 "ibm855", FC_CP855, CM_INV, /* PC CP855 */
398 #endif /* CYRILLIC */
399 "ibm858", FC_CP858, CM_INV, /* PC CP858 (not in MIME) */
401 "ibm862", FC_CP862, CM_INV, /* PC CP862 (not in MIME) */
404 "ibm866", FC_CP866, CM_INV, /* CP866 Cyrillic */
405 #endif /* CYRILLIC */
407 "ibm869", FC_CP869, CM_INV, /* CP869 Greek */
411 "iso-10646-ucs-2", FC_UCS2, CM_INV, /* ISO 10646 / Unicode UCS-2 */
413 "iso-8859-1", FC_1LATIN, CM_INV, /* ISO Latin Alphabet 1 */
414 "iso-8859-15", FC_9LATIN, CM_INV, /* ISO Latin Alphabet 9 (yes) */
415 "iso-8859-2", FC_2LATIN, CM_INV, /* ISO Latin Alphabet 2 */
417 "iso-8859-5", FC_CYRILL, CM_INV, /* ISO Latin/Cyrillic Alphabet */
418 #endif /* CYRILLIC */
420 "iso-8859-7", FC_GREEK, CM_INV, /* ISO 8859-7 Latin/Greek */
423 "iso-8859-8", FC_HEBREW, CM_INV, /* ISO Latin/Hebrew */
426 "iso2022jp-kanji", FC_JIS7, CM_INV, /* Synonym for JIS-7 */
429 "iso646-gb", FC_UKASCII, CM_INV, /* British NRC */
430 "iso646-ca", FC_FCASCII, CM_INV, /* French Canadian NRC */
431 "iso646-de", FC_GEASCII, CM_INV, /* German NRC */
432 "iso646-dk", FC_NOASCII, CM_INV, /* Norwegian and Danish NRC */
433 "iso646-es", FC_SPASCII, CM_INV, /* Spanish NRC */
434 "iso646-fi", FC_FIASCII, CM_INV, /* Finnish NRC */
435 "iso646-fr", FC_FRASCII, CM_INV, /* French NRC */
436 "iso646-hu", FC_HUASCII, CM_INV, /* Hungarian NRC */
437 "iso646-it", FC_ITASCII, CM_INV, /* Italian NRC */
438 "iso646-no", FC_NOASCII, CM_INV, /* Norwegian and Danish NRC */
439 "iso646-po", FC_POASCII, CM_INV, /* Portuguese NRC */
440 "iso646-se", FC_SWASCII, CM_INV, /* Swedish NRC */
442 "italian", FC_ITASCII, CM_INV, /* Italian NRC */
444 "japanese-euc", FC_JEUC, CM_INV, /* Japanese EUC */
445 "jis7-kanji", FC_JIS7, 0, /* Japanese JIS7 7bit code */
448 "k", FC_KOI8, CM_ABR|CM_INV,
449 "ko", FC_KOI8, CM_ABR|CM_INV,
450 "koi", FC_KOI8, CM_ABR|CM_INV,
451 "koi7", FC_KOI7, 0, /* Short KOI Cyrillic */
452 "koi8", FC_KOI8, 0, /* Old KOI-8 Cyrillic */
453 "koi8-e", FC_KOI8, CM_INV, /* Old KOI-8 Cyrillic */
454 "koi8-cyrillic", FC_KOI8, CM_INV,
455 "koi8-r", FC_KOI8R, CM_INV, /* KOI8-R RFC1489 */
456 "koi8-u", FC_KOI8U, CM_INV, /* KOI8-U RFC2319 */
457 "koi8r", FC_KOI8R, 0, /* KOI8-R RFC1489 */
458 "koi8u", FC_KOI8U, 0, /* KOI8-U RFC2319 */
459 #endif /* CYRILLIC */
460 "l", FC_1LATIN, CM_ABR|CM_INV,
461 "la", FC_1LATIN, CM_ABR|CM_INV,
462 "lat", FC_1LATIN, CM_ABR|CM_INV,
463 "lati", FC_1LATIN, CM_ABR|CM_INV,
464 "latin", FC_1LATIN, CM_ABR|CM_INV,
465 "latin1-iso", FC_1LATIN, 0, /* ISO Latin Alphabet 1 */
467 "latin2-iso", FC_2LATIN, 0, /* ISO Latin Alphabet 2 */
469 "latin9-iso", FC_9LATIN, 0, /* ISO Latin Alphabet 9 */
470 "macintosh-latin", FC_APPQD, 0, /* "Extended Mac Latin" */
472 "mazovia-pc", FC_MAZOVIA, 0, /* Polish Mazovia PC code page */
474 "next-multinational", FC_NEXT, 0, /* NeXT workstation */
475 "norwegian", FC_NOASCII, 0, /* Norwegian and Danish NRC */
476 "portuguese", FC_POASCII, 0, /* Portuguese NRC */
478 "shift-jis-kanji", FC_SHJIS, 0, /* Japanese Kanji Shift-JIS */
479 "shift_jis", FC_SHJIS, CM_INV, /* Japanese Kanji Shift-JIS */
482 "short-koi", FC_KOI7, 0, /* Short KOI Cyrillic */
483 #endif /* CYRILLIC */
484 "spanish", FC_SPASCII, 0, /* Spanish NRC */
485 "swedish", FC_SWASCII, 0, /* Swedish NRC */
486 "swiss", FC_CHASCII, 0, /* Swiss NRC */
488 "ucs2", FC_UCS2, 0, /* ISO 10646 / Unicode UCS-2 */
490 "us-ascii", FC_USASCII, CM_INV, /* MIME */
491 "usascii", FC_USASCII, CM_INV,
493 "utf-8", FC_UTF8, CM_INV, /* ISO 10646 / Unicode UTF-8 */
494 "utf8", FC_UTF8, 0, /* ISO 10646 / Unicode UTF-8 */
497 "windows-1250", FC_CP1250, CM_INV, /* Windows CP 1250 */
500 "windows-1251", FC_CP1251, CM_INV, /* Windows CP 1251 */
501 #endif /* CYRILLIC */
502 "windows-1252", FC_CP1252, CM_INV, /* Windows CP 1252 */
505 int nfilc = (sizeof(fcstab) / sizeof(struct keytab)) - 1;
507 struct keytab ttcstab[] = { /* Keyword table for SET TERMINAL CHARACTER-SET */
509 IMPORTANT: This table is a replica of fcstab, immediately above, with the
510 addition of TRANSPARENT and deletion of the Japanese sets. If you make
511 changes to this table, make the corresponding changes to fcstab.
513 /* Keyword Value Flags */
514 "apple-quickdraw", FC_APPQD, CM_INV, /* Apple Quickdraw */
515 "ascii", FC_USASCII, 0, /* ASCII */
516 "british", FC_UKASCII, 0, /* British NRC */
517 "bulgaria-pc", FC_BULGAR, 0, /* Bulgarian PC Code Page */
518 "canadian-french", FC_FCASCII, 0, /* French Canadian NRC */
520 "cp1250", FC_CP1250, 0, /* Windows CP 1250 */
523 "cp1251-cyrillic", FC_CP1251, 0, /* Windows CP 1251 */
524 #endif /* CYRILLIC */
525 "cp1252", FC_CP1252, 0, /* Windows CP 1252 */
526 "cp437", FC_CP437, 0, /* PC CP437 */
527 "cp850", FC_CP850, 0, /* PC CP850 */
529 "cp852", FC_CP852, 0, /* PC CP852 */
532 "cp855-cyrillic", FC_CP855, 0, /* PC CP855 */
533 #endif /* CYRILLIC */
534 "cp858", FC_CP858, 0, /* PC CP858 */
536 "cp862-hebrew", FC_CP862, 0, /* PC CP862 */
539 "cp866-cyrillic", FC_CP866, 0, /* CP866 Cyrillic */
540 #endif /* CYRILLIC */
542 "cp869-greek", FC_CP869, 0, /* CP869 Greek */
545 "cyrillic-iso", FC_CYRILL, 0, /* ISO Latin/Cyrillic Alphabet */
546 #endif /* CYRILLIC */
547 "danish", FC_NOASCII, 0, /* Norwegian and Danish NRC */
548 "dec-mcs", FC_DECMCS, CM_INV, /* DEC multinational char set */
549 "dec-multinational", FC_DECMCS, 0, /* DEC multinational character set */
550 "dg-international", FC_DGMCS, 0, /* Data General multinational */
551 "dutch", FC_DUASCII, 0, /* Dutch NRC */
553 "elot927-greek", FC_ELOT, 0, /* ELOT 927 Greek */
554 "elot928-greek", FC_GREEK, 0, /* Same as ISO 8859-7 Latin/Greek */
556 "finnish", FC_FIASCII, 0, /* Finnish NRC */
557 "french", FC_FRASCII, 0, /* French NRC */
558 "fr-canadian", FC_FCASCII, CM_INV, /* French Canadian NRC */
559 "german", FC_GEASCII, 0, /* German NRC */
561 "greek-iso", FC_GREEK, 0, /* ISO 8859-7 Latin/Greek */
564 "he", FC_HEBREW, CM_ABR|CM_INV,
565 "heb", FC_HEBREW, CM_ABR|CM_INV,
566 "hebr", FC_HEBREW, CM_ABR|CM_INV,
567 "hebre", FC_HEBREW, CM_ABR|CM_INV,
568 "hebrew", FC_HEBREW, CM_ABR|CM_INV,
569 "hebrew-7", FC_HE7, 0, /* DEC 7-Bit Hebrew */
570 "hebrew-iso", FC_HEBREW, 0, /* ISO Latin/Hebrew */
572 "hp-roman8", FC_HPR8, 0, /* Hewlett Packard Roman8 */
573 "hungarian", FC_HUASCII, 0, /* Hungarian NRC */
575 "ibm437", FC_CP437, CM_INV, /* PC CP437 */
576 "ibm850", FC_CP850, CM_INV, /* PC CP850 (not in MIME) */
578 "ibm852", FC_CP852, CM_INV, /* PC CP852 */
581 "ibm855", FC_CP855, CM_INV, /* PC CP855 */
582 #endif /* CYRILLIC */
583 "ibm858", FC_CP858, CM_INV, /* PC CP858 (not in MIME) */
585 "ibm862", FC_CP862, CM_INV, /* PC CP862 (not in MIME) */
588 "ibm866", FC_CP866, CM_INV, /* CP866 Cyrillic */
589 #endif /* CYRILLIC */
591 "ibm869", FC_CP869, CM_INV, /* CP869 Greek */
595 "iso-10646-ucs-2", FC_UCS2, CM_INV, /* ISO 10646 / Unicode UCS-2 */
597 "iso-8859-1", FC_1LATIN, CM_INV, /* ISO Latin Alphabet 1 */
598 "iso-8859-15", FC_9LATIN, CM_INV, /* ISO Latin Alphabet 9 (yes) */
599 "iso-8859-2", FC_2LATIN, CM_INV, /* ISO Latin Alphabet 2 */
601 "iso-8859-5", FC_CYRILL, CM_INV, /* ISO Latin/Cyrillic Alphabet */
602 #endif /* CYRILLIC */
604 "iso-8859-7", FC_GREEK, CM_INV, /* ISO 8859-7 Latin/Greek */
607 "iso-8859-8", FC_HEBREW, CM_INV, /* ISO Latin/Hebrew */
610 "iso646-gb", FC_UKASCII, CM_INV, /* British NRC */
611 "iso646-ca", FC_FCASCII, CM_INV, /* French Canadian NRC */
612 "iso646-de", FC_GEASCII, CM_INV, /* German NRC */
613 "iso646-dk", FC_NOASCII, CM_INV, /* Norwegian and Danish NRC */
614 "iso646-es", FC_SPASCII, CM_INV, /* Spanish NRC */
615 "iso646-fi", FC_FIASCII, CM_INV, /* Finnish NRC */
616 "iso646-fr", FC_FRASCII, CM_INV, /* French NRC */
617 "iso646-hu", FC_HUASCII, CM_INV, /* Hungarian NRC */
618 "iso646-it", FC_ITASCII, CM_INV, /* Italian NRC */
619 "iso646-no", FC_NOASCII, CM_INV, /* Norwegian and Danish NRC */
620 "iso646-po", FC_POASCII, CM_INV, /* Portuguese NRC */
621 "iso646-se", FC_SWASCII, CM_INV, /* Swedish NRC */
623 "italian", FC_ITASCII, CM_INV, /* Italian NRC */
626 "k", FC_KOI8, CM_ABR|CM_INV,
627 "ko", FC_KOI8, CM_ABR|CM_INV,
628 "koi", FC_KOI8, CM_ABR|CM_INV,
629 "koi7", FC_KOI7, 0, /* Short KOI Cyrillic */
630 "koi8", FC_KOI8, 0, /* Old KOI-8 Cyrillic */
631 "koi8-e", FC_KOI8, CM_INV, /* Old KOI-8 Cyrillic */
632 "koi8-cyrillic", FC_KOI8, CM_INV,
633 "koi8-r", FC_KOI8R, CM_INV, /* KOI8-R RFC1489 */
634 "koi8-u", FC_KOI8U, CM_INV, /* KOI8-U RFC2319 */
635 "koi8r", FC_KOI8R, 0, /* KOI8-R RFC1489 */
636 "koi8u", FC_KOI8U, 0, /* KOI8-U RFC2319 */
637 #endif /* CYRILLIC */
638 "l", FC_1LATIN, CM_ABR|CM_INV,
639 "la", FC_1LATIN, CM_ABR|CM_INV,
640 "lat", FC_1LATIN, CM_ABR|CM_INV,
641 "lati", FC_1LATIN, CM_ABR|CM_INV,
642 "latin", FC_1LATIN, CM_ABR|CM_INV,
643 "latin1-iso", FC_1LATIN, 0, /* ISO Latin Alphabet 1 */
645 "latin2-iso", FC_2LATIN, 0, /* ISO Latin Alphabet 2 */
647 "latin9-iso", FC_9LATIN, 0, /* ISO Latin Alphabet 9 */
648 "macintosh-latin", FC_APPQD, 0, /* "Extended Mac Latin" */
650 "mazovia-pc", FC_MAZOVIA, 0, /* Polish Mazovia PC code page */
652 "next-multinational", FC_NEXT, 0, /* NeXT workstation */
653 "norwegian", FC_NOASCII, 0, /* Norwegian and Danish NRC */
654 "portuguese", FC_POASCII, 0, /* Portuguese NRC */
657 "short-koi", FC_KOI7, 0, /* Short KOI Cyrillic */
658 #endif /* CYRILLIC */
659 "spanish", FC_SPASCII, 0, /* Spanish NRC */
660 "swedish", FC_SWASCII, 0, /* Swedish NRC */
661 "swiss", FC_CHASCII, 0, /* Swiss NRC */
662 "transparent", FC_TRANSP, 0, /* Transparent */
664 "ucs2", FC_UCS2, 0, /* ISO 10646 / Unicode UCS-2 */
666 "us-ascii", FC_USASCII, CM_INV, /* MIME */
667 "usascii", FC_USASCII, CM_INV,
669 "utf-8", FC_UTF8, CM_INV, /* ISO 10646 / Unicode UTF-8 */
670 "utf8", FC_UTF8, 0, /* ISO 10646 / Unicode UTF-8 */
673 "windows-1250", FC_CP1250, CM_INV, /* Windows CP 1250 */
676 "windows-1251", FC_CP1251, CM_INV, /* Windows CP 1251 */
677 #endif /* CYRILLIC */
678 "windows-1252", FC_CP1252, CM_INV, /* Windows CP 1252 */
681 int ntermc = (sizeof(ttcstab) / sizeof(struct keytab)) - 1;
683 /* This table contains the equivalent FCS number for each TCS. */
684 /* If the TC_xxx symbol definitions are ever changed, fix this table. */
685 /* Ditto if another TCS is added. */
688 cseqtab[MAXTCSETS+1] = { /* TCS/FCS equivalency table */
689 -1, /* 0 = Transparent */
690 FC_USASCII, /* 1 = ASCII */
691 FC_1LATIN, /* 2 = Latin-1 */
692 FC_2LATIN, /* 3 = Latin-2 */
693 FC_CYRILL, /* 4 = Latin/Cyrillic */
694 FC_JEUC, /* 5 = Japanese EUC */
695 FC_HEBREW, /* 6 = Latin/Hebrew */
696 FC_GREEK, /* 7 = Latin/Greek */
697 FC_9LATIN, /* 8 = Latin-9 */
698 FC_UCS2, /* 9 = UCS-2 */
699 FC_UTF8 /* 10 = UTF-8 */
705 This table allows C-Kermit to have a SET LANGUAGE command to apply special
706 language-specific rules when translating from a character set that contains
707 national characters into plain ASCII, like German umlaut-a becomes ae.
709 Originally, I thought it would be a good idea to let SET LANGUAGE also select
710 an appropriate FILE CHARACTER-SET and TRANSFER CHARACTER-SET automatically,
711 and these are included in the langinfo structure. Later I realized that this
712 was a bad idea. Any particular language (e.g. Dutch) can be represented by
713 many different and incompatible character sets.
715 (But we could use the new (1998) ASSOCIATE command for this...)
718 struct langinfo langs[] = {
719 /* Language code File Charset Xfer Charset Name */
720 L_USASCII, FC_USASCII, TC_USASCII, "ASCII (American English)",
721 L_DANISH, FC_NOASCII, TC_1LATIN, "Danish",
722 L_DUTCH, FC_DUASCII, TC_1LATIN, "Dutch",
723 L_FINNISH, FC_FIASCII, TC_1LATIN, "Finnish",
724 L_FRENCH, FC_FRASCII, TC_1LATIN, "French",
725 L_GERMAN, FC_GEASCII, TC_1LATIN, "German",
727 L_GREEK, FC_GREEK, TC_GREEK, "Greek",
730 L_HEBREW, FC_HEBREW, TC_HEBREW, "Hebrew",
732 L_HUNGARIAN, FC_HUASCII, TC_2LATIN, "Hungarian",
733 L_ICELANDIC, FC_USASCII, TC_1LATIN, "Icelandic",
734 L_ITALIAN, FC_ITASCII, TC_1LATIN, "Italian",
736 L_JAPANESE, FC_JEUC, TC_JEUC, "Japanese",
738 L_NORWEGIAN, FC_NOASCII, TC_1LATIN, "Norwegian",
739 L_PORTUGUESE, FC_POASCII, TC_1LATIN, "Portuguese",
741 L_RUSSIAN, FC_CP866, TC_CYRILL, "Russian",
742 #endif /* CYRILLIC */
743 L_SPANISH, FC_SPASCII, TC_1LATIN, "Spanish",
744 L_SWEDISH, FC_SWASCII, TC_1LATIN, "Swedish",
745 L_SWISS, FC_CHASCII, TC_1LATIN, "Swiss"
747 int nlangs = (sizeof(langs) / sizeof(struct langinfo));
750 Keyword table for the SET LANGUAGE command.
751 Only a few of these (German, Scandinavian, etc) actually do anything.
752 The language is used to invoke special translation rules when converting
753 from an 8-bit character set to ASCII; for example, German u-diaeresis
754 becomes "ue", Dutch y-diaeresis becomes "ij". Languages without associated
755 rules are invisible (CM_INV).
757 struct keytab lngtab[] = {
758 "ascii", L_USASCII, CM_INV,
759 "danish", L_DANISH, 0,
761 "english", L_USASCII, CM_INV,
762 "finnish", L_FINNISH, 0,
763 "french", L_FRENCH, 0,
764 "german", L_GERMAN, 0,
766 "greek", L_GREEK, CM_INV,
769 "hebrew", L_HEBREW, CM_INV,
771 "hungarian", L_HUNGARIAN, CM_INV,
772 "icelandic", L_ICELANDIC, 0,
773 "italian", L_ITALIAN, CM_INV,
775 "japanese", L_JAPANESE, CM_INV,
777 "norwegian", L_NORWEGIAN, 0,
778 "none", L_USASCII, 0,
779 "portuguese", L_PORTUGUESE, CM_INV,
781 "russian", L_RUSSIAN, 0,
782 #endif /* CYRILLIC */
783 "spanish", L_SPANISH, CM_INV,
784 "swedish", L_SWEDISH, 0,
786 "ukrainian", L_RUSSIAN, 0,
787 #endif /* CYRILLIC */
790 int nlng = (sizeof(lngtab) / sizeof(struct keytab)) - 1; /* how many */
793 /* Translation tables ... */
796 For each pair of (transfer,file) character sets, we need two translation
797 functions, one for sending, one for receiving.
801 Here is the first table, Latin-1 to ASCII, fully annotated...
802 This one is absolutely NOT invertible, since we're going from an 8-bit
803 set to a 7-bit set. Accented letters are mapped to unaccented
804 equivalents, C1 control characters are all translated to "?", etc.
807 yl1as[] = { /* ISO 8859-1 Latin Alphabet 1 to US ASCII */
808 /* Source character Description => Translation */
809 /* Dec row/col Set */
810 0, /* 000 00/00 C0 NUL Ctrl-@ => (self) */
811 1, /* 001 00/01 C0 SOH Ctrl-A => (self) */
812 2, /* 002 00/02 C0 STX Ctrl-B => (self) */
813 3, /* 003 00/03 C0 ETX Ctrl-C => (self) */
814 4, /* 004 00/04 C0 EOT Ctrl-D => (self) */
815 5, /* 005 00/05 C0 ENQ Ctrl-E => (self) */
816 6, /* 006 00/06 C0 ACK Ctrl-F => (self) */
817 7, /* 007 00/07 C0 BEL Ctrl-G => (self) */
818 8, /* 008 00/08 C0 BS Ctrl-H => (self) */
819 9, /* 009 00/09 C0 HT Ctrl-I => (self) */
820 10, /* 010 00/10 C0 LF Ctrl-J => (self) */
821 11, /* 011 00/11 C0 VT Ctrl-K => (self) */
822 12, /* 012 00/12 C0 FF Ctrl-L => (self) */
823 13, /* 013 00/13 C0 CR Ctrl-M => (self) */
824 14, /* 014 00/14 C0 SO Ctrl-N => (self) */
825 15, /* 015 00/15 C0 SI Ctrl-O => (self) */
826 16, /* 016 01/00 C0 DLE Ctrl-P => (self) */
827 17, /* 017 01/01 C0 DC1 Ctrl-Q => (self) */
828 18, /* 018 01/02 C0 DC2 Ctrl-R => (self) */
829 19, /* 019 01/03 C0 DC3 Ctrl-S => (self) */
830 20, /* 020 01/04 C0 DC4 Ctrl-T => (self) */
831 21, /* 021 01/05 C0 NAK Ctrl-U => (self) */
832 22, /* 022 01/06 C0 SYN Ctrl-V => (self) */
833 23, /* 023 01/07 C0 ETB Ctrl-W => (self) */
834 24, /* 024 01/08 C0 CAN Ctrl-X => (self) */
835 25, /* 025 01/09 C0 EM Ctrl-Y => (self) */
836 26, /* 026 01/10 C0 SUB Ctrl-Z => (self) */
837 27, /* 027 01/11 C0 ESC Ctrl-[ => (self) */
838 28, /* 028 01/12 C0 FS Ctrl-\ => (self) */
839 29, /* 029 01/13 C0 GS Ctrl-] => (self) */
840 30, /* 030 01/14 C0 RS Ctrl-^ => (self) */
841 31, /* 031 01/15 C0 US Ctrl-_ => (self) */
842 32, /* 032 02/00 SP Space => (self) */
843 33, /* 033 02/01 G0 ! Exclamation mark => (self) */
844 34, /* 034 02/02 G0 " Doublequote => (self) */
845 35, /* 035 02/03 G0 # Number sign => (self) */
846 36, /* 036 02/04 G0 $ Dollar sign => (self) */
847 37, /* 037 02/05 G0 % Percent sign => (self) */
848 38, /* 038 02/06 G0 & Ampersand => (self) */
849 39, /* 039 02/07 G0 ' Apostrophe => (self) */
850 40, /* 040 02/08 G0 ( Left parenthesis => (self) */
851 41, /* 041 02/09 G0 ) Right parenthesis => (self) */
852 42, /* 042 02/10 G0 * Asterisk => (self) */
853 43, /* 043 02/11 G0 + Plus sign => (self) */
854 44, /* 044 02/12 G0 , Comma => (self) */
855 45, /* 045 02/13 G0 - Hyphen, minus sign => (self) */
856 46, /* 046 02/14 G0 . Period, full stop => (self) */
857 47, /* 047 02/15 G0 / Slash, solidus => (self) */
858 48, /* 048 03/00 G0 0 Digit 0 => (self) */
859 49, /* 049 03/01 G0 1 Digit 1 => (self) */
860 50, /* 050 03/02 G0 2 Digit 2 => (self) */
861 51, /* 051 03/03 G0 3 Digit 3 => (self) */
862 52, /* 052 03/04 G0 4 Digit 4 => (self) */
863 53, /* 053 03/05 G0 5 Digit 5 => (self) */
864 54, /* 054 03/06 G0 6 Digit 6 => (self) */
865 55, /* 055 03/07 G0 7 Digit 7 => (self) */
866 56, /* 056 03/08 G0 8 Digit 8 => (self) */
867 57, /* 057 03/09 G0 9 Digit 9 => (self) */
868 58, /* 058 03/10 G0 : Colon => (self) */
869 59, /* 059 03/11 G0 ; Semicolon => (self) */
870 60, /* 060 03/12 G0 < Less-than sign => (self) */
871 61, /* 061 03/13 G0 = Equals sign => (self) */
872 62, /* 062 03/14 G0 > Greater-than sign => (self) */
873 63, /* 063 03/15 G0 ? Question mark => (self) */
874 64, /* 064 04/00 G0 @ Commercial at sign => (self) */
875 65, /* 065 04/01 G0 A Letter A => (self) */
876 66, /* 066 04/02 G0 B Letter B => (self) */
877 67, /* 067 04/03 G0 C Letter C => (self) */
878 68, /* 068 04/04 G0 D Letter D => (self) */
879 69, /* 069 04/05 G0 E Letter E => (self) */
880 70, /* 070 04/06 G0 F Letter F => (self) */
881 71, /* 071 04/07 G0 G Letter G => (self) */
882 72, /* 072 04/08 G0 H Letter H => (self) */
883 73, /* 073 04/09 G0 I Letter I => (self) */
884 74, /* 074 04/10 G0 J Letter J => (self) */
885 75, /* 075 04/11 G0 K Letter K => (self) */
886 76, /* 076 04/12 G0 L Letter L => (self) */
887 77, /* 077 04/13 G0 M Letter M => (self) */
888 78, /* 078 04/14 G0 N Letter N => (self) */
889 79, /* 079 04/15 G0 O Letter O => (self) */
890 80, /* 080 05/00 G0 P Letter P => (self) */
891 81, /* 081 05/01 G0 Q Letter Q => (self) */
892 82, /* 082 05/02 G0 R Letter R => (self) */
893 83, /* 083 05/03 G0 S Letter S => (self) */
894 84, /* 084 05/04 G0 T Letter T => (self) */
895 85, /* 085 05/05 G0 U Letter U => (self) */
896 86, /* 086 05/06 G0 V Letter V => (self) */
897 87, /* 087 05/07 G0 W Letter W => (self) */
898 88, /* 088 05/08 G0 X Letter X => (self) */
899 89, /* 089 05/09 G0 Y Letter Y => (self) */
900 90, /* 090 05/10 G0 Z Letter Z => (self) */
901 91, /* 091 05/11 G0 [ Left square bracket => (self) */
902 92, /* 092 05/12 G0 \ Reverse slash => (self) */
903 93, /* 093 05/13 G0 ] Right square bracket => (self) */
904 94, /* 094 05/14 G0 ^ Circumflex accent => (self) */
905 95, /* 095 05/15 G0 _ Underline, low line => (self) */
906 96, /* 096 06/00 G0 ` Grave accent => (self) */
907 97, /* 097 06/01 G0 a Letter a => (self) */
908 98, /* 098 06/02 G0 b Letter b => (self) */
909 99, /* 099 06/03 G0 c Letter c => (self) */
910 100, /* 100 06/04 G0 d Letter d => (self) */
911 101, /* 101 06/05 G0 e Letter e => (self) */
912 102, /* 102 06/06 G0 f Letter f => (self) */
913 103, /* 103 06/07 G0 g Letter g => (self) */
914 104, /* 104 06/08 G0 h Letter h => (self) */
915 105, /* 105 06/09 G0 i Letter i => (self) */
916 106, /* 106 06/10 G0 j Letter j => (self) */
917 107, /* 107 06/11 G0 k Letter k => (self) */
918 108, /* 108 06/12 G0 l Letter l => (self) */
919 109, /* 109 06/13 G0 m Letter m => (self) */
920 110, /* 110 06/14 G0 n Letter n => (self) */
921 111, /* 111 06/15 G0 o Letter o => (self) */
922 112, /* 112 07/00 G0 p Letter p => (self) */
923 113, /* 113 07/01 G0 q Letter q => (self) */
924 114, /* 114 07/02 G0 r Letter r => (self) */
925 115, /* 115 07/03 G0 s Letter s => (self) */
926 116, /* 116 07/04 G0 t Letter t => (self) */
927 117, /* 117 07/05 G0 u Letter u => (self) */
928 118, /* 118 07/06 G0 v Letter v => (self) */
929 119, /* 119 07/07 G0 w Letter w => (self) */
930 120, /* 120 07/08 G0 x Letter x => (self) */
931 121, /* 121 07/09 G0 y Letter y => (self) */
932 122, /* 122 07/10 G0 z Letter z => (self) */
933 123, /* 123 07/11 G0 { Left curly bracket => (self) */
934 124, /* 124 07/12 G0 | Vertical bar => (self) */
935 125, /* 125 07/13 G0 } Right curly bracket => (self) */
936 126, /* 126 07/14 G0 ~ Tilde => (self) */
937 127, /* 127 07/15 DEL Delete, Rubout => (self) */
938 UNK, /* 128 08/00 C1 => UNK */
939 UNK, /* 129 08/01 C1 => UNK */
940 UNK, /* 130 08/02 C1 => UNK */
941 UNK, /* 131 08/03 C1 => UNK */
942 UNK, /* 132 08/04 C1 IND => UNK */
943 UNK, /* 133 08/05 C1 NEL => UNK */
944 UNK, /* 134 08/06 C1 SSA => UNK */
945 UNK, /* 135 08/07 C1 ESA => UNK */
946 UNK, /* 136 08/08 C1 HTS => UNK */
947 UNK, /* 137 08/09 C1 => UNK */
948 UNK, /* 138 08/10 C1 => UNK */
949 UNK, /* 139 08/11 C1 => UNK */
950 UNK, /* 140 08/12 C1 => UNK */
951 UNK, /* 141 08/13 C1 RI => UNK */
952 UNK, /* 142 08/14 C1 SS2 => UNK */
953 UNK, /* 143 08/15 C1 SS3 => UNK */
954 UNK, /* 144 09/00 C1 DCS => UNK */
955 UNK, /* 145 09/01 C1 => UNK */
956 UNK, /* 146 09/02 C1 => UNK */
957 UNK, /* 147 09/03 C1 STS => UNK */
958 UNK, /* 148 09/04 C1 => UNK */
959 UNK, /* 149 09/05 C1 => UNK */
960 UNK, /* 150 09/06 C1 SPA => UNK */
961 UNK, /* 151 09/07 C1 EPA => UNK */
962 UNK, /* 152 09/08 C1 => UNK */
963 UNK, /* 153 09/09 C1 => UNK */
964 UNK, /* 154 09/10 C1 => UNK */
965 UNK, /* 155 09/11 C1 CSI => UNK */
966 UNK, /* 156 09/12 C1 ST => UNK */
967 UNK, /* 157 09/13 C1 OSC => UNK */
968 UNK, /* 158 09/14 C1 PM => UNK */
969 UNK, /* 159 09/15 C1 APC => UNK */
970 32, /* 160 10/00 G1 No-break space => SP */
971 33, /* 161 10/01 G1 Inverted exclamation => ! */
972 99, /* 162 10/02 G1 Cent sign => c */
973 35, /* 163 10/03 G1 Pound sign => # */
974 36, /* 164 10/04 G1 Currency sign => $ */
975 89, /* 165 10/05 G1 Yen sign => Y */
976 124, /* 166 10/06 G1 Broken bar => | */
977 80, /* 167 10/07 G1 Paragraph sign => P */
978 34, /* 168 10/08 G1 Diaeresis => " */
979 67, /* 169 10/09 G1 Copyright sign => C */
980 97, /* 170 10/10 G1 Feminine ordinal => a */
981 34, /* 171 10/11 G1 Left angle quotation => " */
982 126, /* 172 10/12 G1 Not sign => ~ */
983 45, /* 173 10/13 G1 Soft hyphen => - */
984 82, /* 174 10/14 G1 Registered trade mark => R */
985 95, /* 175 10/15 G1 Macron => _ */
986 111, /* 176 11/00 G1 Degree sign, ring above => o */
987 UNK, /* 177 11/01 G1 Plus-minus sign => UNK */
988 50, /* 178 11/02 G1 Superscript two => 2 */
989 51, /* 179 11/03 G1 Superscript three => 3 */
990 39, /* 180 11/04 G1 Acute accent => ' */
991 117, /* 181 11/05 G1 Micro sign => u */
992 45, /* 182 11/06 G1 Pilcrow sign => - */
993 45, /* 183 11/07 G1 Middle dot => - */
994 44, /* 184 11/08 G1 Cedilla => , */
995 49, /* 185 11/09 G1 Superscript one => 1 */
996 111, /* 186 11/10 G1 Masculine ordinal => o */
997 34, /* 187 11/11 G1 Right angle quotation => " */
998 UNK, /* 188 11/12 G1 One quarter => UNK */
999 UNK, /* 189 11/13 G1 One half => UNK */
1000 UNK, /* 190 11/14 G1 Three quarters => UNK */
1001 63, /* 191 11/15 G1 Inverted question mark => ? */
1002 65, /* 192 12/00 G1 A grave => A */
1003 65, /* 193 12/01 G1 A acute => A */
1004 65, /* 194 12/02 G1 A circumflex => A */
1005 65, /* 195 12/03 G1 A tilde => A */
1006 65, /* 196 12/04 G1 A diaeresis => A */
1007 65, /* 197 12/05 G1 A ring above => A */
1008 65, /* 198 12/06 G1 A with E => A */
1009 67, /* 199 12/07 G1 C Cedilla => C */
1010 69, /* 200 12/08 G1 E grave => E */
1011 69, /* 201 12/09 G1 E acute => E */
1012 69, /* 202 12/10 G1 E circumflex => E */
1013 69, /* 203 12/11 G1 E diaeresis => E */
1014 73, /* 204 12/12 G1 I grave => I */
1015 73, /* 205 12/13 G1 I acute => I */
1016 73, /* 206 12/14 G1 I circumflex => I */
1017 73, /* 207 12/15 G1 I diaeresis => I */
1018 68, /* 208 13/00 G1 Icelandic Eth => D */
1019 78, /* 209 13/01 G1 N tilde => N */
1020 79, /* 210 13/02 G1 O grave => O */
1021 79, /* 211 13/03 G1 O acute => O */
1022 79, /* 212 13/04 G1 O circumflex => O */
1023 79, /* 213 13/05 G1 O tilde => O */
1024 79, /* 214 13/06 G1 O diaeresis => O */
1025 120, /* 215 13/07 G1 Multiplication sign => x */
1026 79, /* 216 13/08 G1 O oblique stroke => O */
1027 85, /* 217 13/09 G1 U grave => U */
1028 85, /* 218 13/10 G1 U acute => U */
1029 85, /* 219 13/11 G1 U circumflex => U */
1030 85, /* 220 13/12 G1 U diaeresis => U */
1031 89, /* 221 13/13 G1 Y acute => Y */
1032 84, /* 222 13/14 G1 Icelandic Thorn => T */
1033 115, /* 223 13/15 G1 German sharp s => s */
1034 97, /* 224 14/00 G1 a grave => a */
1035 97, /* 225 14/01 G1 a acute => a */
1036 97, /* 226 14/02 G1 a circumflex => a */
1037 97, /* 227 14/03 G1 a tilde => a */
1038 97, /* 228 14/04 G1 a diaeresis => a */
1039 97, /* 229 14/05 G1 a ring above => a */
1040 97, /* 230 14/06 G1 a with e => a */
1041 99, /* 231 14/07 G1 c cedilla => c */
1042 101, /* 232 14/08 G1 e grave => e */
1043 101, /* 233 14/09 G1 e acute => e */
1044 101, /* 234 14/10 G1 e circumflex => e */
1045 101, /* 235 14/11 G1 e diaeresis => e */
1046 105, /* 236 14/12 G1 i grave => i */
1047 105, /* 237 14/13 G1 i acute => i */
1048 105, /* 238 14/14 G1 i circumflex => i */
1049 105, /* 239 14/15 G1 i diaeresis => i */
1050 100, /* 240 15/00 G1 Icelandic eth => d */
1051 110, /* 241 15/01 G1 n tilde => n */
1052 111, /* 242 15/02 G1 o grave => o */
1053 111, /* 243 15/03 G1 o acute => o */
1054 111, /* 244 15/04 G1 o circumflex => o */
1055 111, /* 245 15/05 G1 o tilde => o */
1056 111, /* 246 15/06 G1 o diaeresis => o */
1057 47, /* 247 15/07 G1 Division sign => / */
1058 111, /* 248 15/08 G1 o oblique stroke => o */
1059 117, /* 249 15/09 G1 u grave => u */
1060 117, /* 250 15/10 G1 u acute => u */
1061 117, /* 251 15/11 G1 u circumflex => u */
1062 117, /* 252 15/12 G1 u diaeresis => u */
1063 121, /* 253 15/13 G1 y acute => y */
1064 116, /* 254 15/14 G1 Icelandic thorn => t */
1065 121 /* 255 15/15 G1 y diaeresis => y */
1069 /* Translation tables for ISO Latin Alphabet 1 to local file character sets */
1072 Most of the remaining tables are not annotated like the one above, because
1073 the size of the resulting source file would be ridiculous. Each row in the
1074 following tables corresponds to a column of ISO 8859-1.
1078 yl185[] = { /* ISO 8859-1 Latin Alphabet 1 (Latin-1) to IBM Code Page 850 */
1080 This is based on IBM's official invertible translation. Reference: IBM
1081 Character Data Representation Architecture (CDRA), Level 1, Registry,
1082 SC09-1291-00 (1990), p.152. (Note: Latin-1 is IBM Code Page 00819.) Note:
1083 IBM's bizarre rearrangement of C0 controls and DEL has been undone in this
1086 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1087 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1088 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1089 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1090 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1091 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1092 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1093 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1094 186, 205, 201, 187, 200, 188, 204, 185, 203, 202, 206, 223, 220, 219, 254, 242,
1095 179, 196, 218, 191, 192, 217, 195, 180, 194, 193, 197, 176, 177, 178, 213, 159,
1096 255, 173, 189, 156, 207, 190, 221, 245, 249, 184, 166, 174, 170, 240, 169, 238,
1097 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168,
1098 183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216,
1099 209, 165, 227, 224, 226, 229, 153, 158, 157, 235, 233, 234, 154, 237, 232, 225,
1100 133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139,
1101 208, 164, 149, 162, 147, 228, 148, 246, 155, 151, 163, 150, 129, 236, 231, 152
1105 y85l1[] = { /* IBM Code Page 850 to Latin-1 */
1107 This is from IBM CDRA page 153. It is the inverse of yl185[].
1108 As of edit 183, this table is no longer pure CDRA. The translations
1109 involving C0 controls and DEL have been removed.
1111 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1112 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1113 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1114 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1115 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1116 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1117 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1118 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1119 199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197,
1120 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163, 216, 215, 159,
1121 225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187,
1122 155, 156, 157, 144, 151, 193, 194, 192, 169, 135, 128, 131, 133, 162, 165, 147,
1123 148, 153, 152, 150, 145, 154, 227, 195, 132, 130, 137, 136, 134, 129, 138, 164,
1124 240, 208, 202, 203, 200, 158, 205, 206, 207, 149, 146, 141, 140, 166, 204, 139,
1125 211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180,
1126 173, 177, 143, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 142, 160
1131 yl1r8[] = { /* Latin-1 to Hewlett Packard Roman8 */
1132 /* This is HP's official translation, straight from iconv */
1133 /* It is NOT invertible. */
1134 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1135 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1136 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1137 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1138 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1139 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1140 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1141 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1142 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1143 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1144 160, 184, 191, 187, 186, 188, 124, 189, 171, 99, 249, 251, 126, 45, 82, 176,
1145 179, 254, 50, 51, 168, 243, 244, 242, 44, 49, 250, 253, 247, 248, 245, 185,
1146 161, 224, 162, 225, 216, 208, 211, 180, 163, 220, 164, 165, 230, 229, 166, 167,
1147 227, 182, 232, 231, 223, 233, 218, 120, 210, 173, 237, 174, 219, 177, 240, 222,
1148 200, 196, 192, 226, 204, 212, 215, 181, 201, 197, 193, 205, 217, 213, 209, 221,
1149 228, 183, 202, 198, 194, 234, 206, 47, 214, 203, 199, 195, 207, 178, 241, 239
1152 yr8l1[] = { /* Hewlett Packard Roman8 to Latin-1 */
1153 /* This is HP's official translation, straight from iconv */
1154 /* It is NOT invertible. */
1155 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1156 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1157 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1158 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1159 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1160 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1161 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1162 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1163 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1164 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1165 160, 192, 194, 200, 202, 203, 206, 207, 180, 96, 94, 168, 126, 217, 219, 163,
1166 175, 221, 253, 176, 199, 231, 209, 241, 161, 191, 164, 163, 165, 167, 102, 162,
1167 226, 234, 244, 251, 225, 233, 243, 250, 224, 232, 242, 249, 228, 235, 246, 252,
1168 197, 238, 216, 198, 229, 237, 248, 230, 196, 236, 214, 220, 201, 239, 223, 212,
1169 193, 195, 227, 208, 240, 205, 204, 211, 210, 213, 245, 83, 115, 218, 89, 255,
1170 222, 254, 183, 181, 182, 190, 45, 188, 189, 170, 186, 171, 42, 187, 177, 160
1172 #else /* !COMMENT */
1173 /* This is an invertible mapping, approved by HP in January 1994. */
1175 yl1r8[] = { /* ISO Latin-1 to HP Roman8, Invertible */
1176 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1177 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1178 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1179 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1180 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1181 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1182 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1183 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1184 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1185 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1186 160, 184, 191, 187, 186, 188, 169, 189, 171, 170, 249, 251, 172, 175, 190, 176,
1187 179, 254, 235, 236, 168, 243, 244, 242, 238, 246, 250, 253, 247, 248, 245, 185,
1188 161, 224, 162, 225, 216, 208, 211, 180, 163, 220, 164, 165, 230, 229, 166, 167,
1189 227, 182, 232, 231, 223, 233, 218, 252, 210, 173, 237, 174, 219, 177, 240, 222,
1190 200, 196, 192, 226, 204, 212, 215, 181, 201, 197, 193, 205, 217, 213, 209, 221,
1191 228, 183, 202, 198, 194, 234, 206, 255, 214, 203, 199, 195, 207, 178, 241, 239
1195 yr8l1[] = { /* HP Roman8 to ISO Latin-1, Invertible */
1196 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1197 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1198 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1199 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1200 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1201 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1202 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1203 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1204 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1205 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1206 160, 192, 194, 200, 202, 203, 206, 207, 180, 166, 169, 168, 172, 217, 219, 173,
1207 175, 221, 253, 176, 199, 231, 209, 241, 161, 191, 164, 163, 165, 167, 174, 162,
1208 226, 234, 244, 251, 225, 233, 243, 250, 224, 232, 242, 249, 228, 235, 246, 252,
1209 197, 238, 216, 198, 229, 237, 248, 230, 196, 236, 214, 220, 201, 239, 223, 212,
1210 193, 195, 227, 208, 240, 205, 204, 211, 210, 213, 245, 178, 179, 218, 184, 255,
1211 222, 254, 183, 181, 182, 190, 185, 188, 189, 170, 186, 171, 215, 187, 177, 247
1213 #endif /* COMMENT */
1216 yl143[] = { /* Latin-1 to IBM Code Page 437 */
1218 Although the IBM CDRA does not include an official translation between CP437
1219 and ISO Latin Alphabet 1, it does include an official, invertible
1220 translation between CP437 and CP850 (page 196), and another from CP850 to
1221 Latin-1 (CP819) (page 153). This translation was obtained with a two-step
1222 process based on those tables.
1223 As of edit 183, the translation is modified to leave C0 controls alone.
1225 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1226 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1227 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1228 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1229 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1230 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1231 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1232 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1233 186, 205, 201, 187, 200, 188, 204, 185, 203, 202, 206, 223, 220, 219, 254, 242,
1234 179, 196, 218, 191, 192, 217, 195, 180, 194, 193, 197, 176, 177, 178, 213, 159,
1235 255, 173, 155, 156, 207, 157, 221, 245, 249, 184, 166, 174, 170, 240, 169, 238,
1236 248, 241, 253, 252, 239, 230, 244, 250, 247, 251, 167, 175, 172, 171, 243, 168,
1237 183, 181, 182, 199, 142, 143, 146, 128, 212, 144, 210, 211, 222, 214, 215, 216,
1238 209, 165, 227, 224, 226, 229, 153, 158, 190, 235, 233, 234, 154, 237, 232, 225,
1239 133, 160, 131, 198, 132, 134, 145, 135, 138, 130, 136, 137, 141, 161, 140, 139,
1240 208, 164, 149, 162, 147, 228, 148, 246, 189, 151, 163, 150, 129, 236, 231, 152
1244 y43l1[] = { /* IBM Code Page 437 to Latin-1 */
1246 This table is the inverse of yl143[].
1248 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1249 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1250 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1251 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1252 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1253 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1254 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1255 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1256 199, 252, 233, 226, 228, 224, 229, 231, 234, 235, 232, 239, 238, 236, 196, 197,
1257 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 162, 163, 165, 215, 159,
1258 225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187,
1259 155, 156, 157, 144, 151, 193, 194, 192, 169, 135, 128, 131, 133, 248, 216, 147,
1260 148, 153, 152, 150, 145, 154, 227, 195, 132, 130, 137, 136, 134, 129, 138, 164,
1261 240, 208, 202, 203, 200, 158, 205, 206, 207, 149, 146, 141, 140, 166, 204, 139,
1262 211, 223, 212, 210, 245, 213, 181, 254, 222, 218, 219, 217, 253, 221, 175, 180,
1263 173, 177, 143, 190, 182, 167, 247, 184, 176, 168, 183, 185, 179, 178, 142, 160
1267 yl1aq[] = { /* Latin-1 to Extended Mac Latin (based on Apple QuickDraw) */
1268 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1269 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1270 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1271 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1272 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1273 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1274 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1275 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1276 182, 183, 184, 185, 189, 196, 197, 198, 206, 207, 210, 211, 217, 218, 195, 212,
1277 209, 215, 213, 226, 227, 228, 240, 245, 246, 247, 249, 250, 251, 253, 254, 255,
1278 202, 193, 162, 163, 219, 180, 201, 164, 172, 169, 187, 199, 194, 208, 168, 248,
1279 161, 177, 170, 173, 171, 181, 166, 225, 252, 176, 188, 200, 178, 179, 186, 192,
1280 203, 231, 229, 204, 128, 129, 174, 130, 233, 131, 230, 232, 237, 234, 235, 236,
1281 220, 132, 241, 238, 239, 205, 133, 165, 175, 244, 242, 243, 134, 160, 222, 167,
1282 136, 135, 137, 139, 138, 140, 190, 141, 143, 142, 144, 145, 147, 146, 148, 149,
1283 221, 150, 152, 151, 153, 155, 154, 214, 191, 157, 156, 158, 159, 224, 223, 216
1287 yl1du[] = { /* Latin-1 to Dutch ISO 646 */
1288 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1289 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1290 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1291 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1292 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1293 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1294 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1295 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, 39, 127,
1296 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1297 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1298 32, 33, UNK, 35, 124, UNK, UNK, 93, 123, 67, UNK, 34, UNK, 45, 82, UNK,
1299 91, UNK, UNK, UNK, 126, 117, UNK, UNK, 44, UNK, UNK, 34, 125, 92, 64, 63,
1300 65, 65, 65, 65, 91, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1301 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1302 97, 97, 97, 97, 97, 97, 97, 99, 101, 101, 101, 101, 105, 105, 105, 105,
1303 UNK, 110, 111, 111, 111, 111, 111, 47, 111, 117, 117, 117, 117, 121, UNK, 91
1307 yl1fi[] = { /* Latin-1 to Finnish ISO NRC (*not* ISO 646) */
1308 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1309 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1310 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1311 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1312 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1313 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, UNK, 95,
1314 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1315 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1316 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1317 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1318 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1319 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1320 65, 65, 65, 65, 91, 93, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1321 UNK, 78, 79, 79, 79, 79, 92, 120, 79, 85, 85, 85, 94, 89, UNK, 115,
1322 97, 97, 97, 97, 123, 125, 97, 99, 101, 96, 101, 101, 105, 105, 105, 105,
1323 UNK, 110, 111, 111, 111, 111, 124, 47, 111, 117, 117, 117, 126, 121, UNK, 121
1327 yl1fr[] = { /* Latin-1 to French ISO 646 */
1328 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1329 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1330 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1331 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1332 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1333 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1334 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1335 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1336 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1337 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1338 32, 33, UNK, 35, UNK, UNK, UNK, 93, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1339 91, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1340 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1341 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1342 64, 97, 97, 97, 97, 97, 97, 92, 125, 123, 101, 101, 105, 105, 105, 105,
1343 UNK, 110, 111, 111, 111, 111, 111, 47, 111, 124, 117, 117, 117, 121, UNK, 121
1347 yl1fc[] = { /* Latin-1 to French-Canadian ISO 646 */
1348 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1349 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1350 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1351 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1352 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1353 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, UNK, 95,
1354 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1355 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1356 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1357 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1358 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1359 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1360 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1361 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1362 64, 97, 91, 97, 97, 97, 97, 92, 125, 123, 93, 101, 105, 105, 94, 105,
1363 UNK, 110, 111, 111, 96, 111, 111, 47, 111, 124, 117, 126, 117, 121, UNK, 121
1367 yl1ge[] = { /* Latin-1 to German ISO 646 */
1368 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1369 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1370 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1371 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1372 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1373 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1374 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1375 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1376 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1377 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1378 32, 33, UNK, UNK, UNK, UNK, UNK, 64, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1379 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1380 65, 65, 65, 65, 91, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1381 UNK, 78, 79, 79, 79, 79, 92, 120, 79, 85, 85, 85, 93, 89, UNK, 126,
1382 97, 97, 97, 97, 123, 97, 97, 99, 101, 101, 101, 101, 105, 105, 105, 105,
1383 UNK, 110, 111, 111, 111, 111, 124, 47, 111, 117, 117, 117, 125, 121, UNK, 121
1387 yl1hu[] = { /* Latin-1 to Hungarian ISO-646 */
1388 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1389 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1390 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1391 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1392 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1393 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1394 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1395 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1396 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1397 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1398 32, 33, UNK, UNK, 36, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1399 UNK, 64, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1400 65, 65, 65, 65, 65, 65, 65, 67, 69, 91, 69, 69, 73, 73, 73, 73,
1401 UNK, 78, 79, 79, 79, 79, 92, 120, 79, 85, 85, 85, 93, 89, UNK, 115,
1402 97, 96, 97, 97, 97, 97, 97, 99, 101, 123, 101, 101, 105, 105, 105, 105,
1403 UNK, 110, 111, 111, 111, 111, 124, 47, 111, 117, 117, 117, 125, 121, UNK, 121
1407 yl1it[] = { /* Latin-1 to Italian ISO 646 */
1408 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1409 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1410 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1411 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1412 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1413 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1414 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1415 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1416 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1417 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1418 32, 33, UNK, 35, UNK, UNK, UNK, 64, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1419 91, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1420 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1421 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1422 123, 97, 97, 97, 97, 97, 97, 92, 125, 93, 101, 101, 126, 105, 105, 105,
1423 UNK, 110, 124, 111, 111, 111, 111, 47, 111, 96, 117, 117, 117, 121, UNK, 121
1427 yl1ne[] = { /* Latin-1 to NeXT */
1428 /* NEED TO MAKE THIS ONE INVERTIBLE, LIKE CP850 */
1430 Which means finding all the graphic characters in the NeXT set that have
1431 no equivalent in Latin-1 and assigning them to the UNK positions (mostly
1432 Latin-1 C1 controls). Then make the ynel1[] table be the inverse of this
1433 one. But first we should try to get an official Latin-1/NeXT translation
1434 table from NeXT, Inc.
1436 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1437 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1438 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1439 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1440 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1441 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1442 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1443 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1444 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1445 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1446 32, 161, 162, 163, 168, 165, 181, 167, 200, 160, 227, 171, 190, UNK, 176, 197,
1447 202, 209, 201, 204, 194, 157, 182, 183, 203, 192, 235, 187, 210, 211, 212, 191,
1448 129, 130, 131, 132, 133, 134, 225, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1449 144, 145, 146, 147, 148, 149, 150, 158, 233, 151, 152, 153, 154, 155, 156, 251,
1450 213, 214, 215, 216, 217, 218, 241, 219, 220, 221, 222, 223, 224, 226, 228, 229,
1451 230, 231, 236, 237, 238, 239, 240, 159, 249, 242, 243, 244, 246, 247, 252, 253
1455 yl1no[] = { /* Latin-1 to Norwegian/Danish ISO 646 */
1456 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1457 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1458 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1459 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1460 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1461 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1462 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1463 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, 126, 127,
1464 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1465 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1466 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1467 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1468 65, 65, 65, 65, 65, 93, 91, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1469 UNK, 78, 79, 79, 79, 79, 79, 120, 92, 85, 85, 85, 85, 89, UNK, 115,
1470 97, 97, 97, 97, 97, 125, 123, 99, 101, 101, 101, 101, 105, 105, 105, 105,
1471 UNK, 110, 111, 111, 111, 111, 111, 47, 124, 117, 117, 117, 117, 121, UNK, 121
1475 yl1po[] = { /* Latin-1 to Portuguese ISO 646 */
1476 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1477 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1478 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1479 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1480 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1481 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1482 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1483 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, 126, 127,
1484 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1485 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1486 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1487 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1488 65, 65, 65, 91, 65, 65, 65, 92, 69, 69, 69, 69, 73, 73, 73, 73,
1489 UNK, 78, 79, 79, 79, 93, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1490 97, 97, 97, 123, 97, 97, 97, 124, 101, 101, 101, 101, 105, 105, 105, 105,
1491 UNK, 110, 111, 111, 111, 125, 111, 47, 111, 117, 117, 117, 117, 121, UNK, 121
1495 yl1sp[] = { /* Latin-1 to Spanish ISO 646 */
1496 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1497 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1498 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1499 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1500 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1501 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, 94, 95,
1502 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1503 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 96, UNK, UNK, 126, 127,
1504 126, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1505 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1506 32, 91, UNK, 35, UNK, UNK, UNK, 64, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1507 123, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 93,
1508 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1509 UNK, 92, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1510 124, 97, 97, 97, 97, 97, 97, 125, 101, 101, 101, 101, 105, 105, 105, 105,
1511 UNK, 124, 111, 111, 111, 111, 111, 47, 111, 117, 117, 117, 117, 121, UNK, 121
1515 yl1sw[] = { /* Latin-1 to Swedish ISO 646 */
1516 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1517 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1518 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1519 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1520 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1521 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, UNK, 95,
1522 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1523 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1524 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1525 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1526 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1527 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1528 65, 65, 65, 65, 91, 93, 65, 67, 69, 64, 69, 69, 73, 73, 73, 73,
1529 UNK, 78, 79, 79, 79, 79, 92, 120, 79, 85, 85, 85, 94, 89, UNK, 115,
1530 97, 97, 97, 97, 123, 125, 97, 99, 101, 96, 101, 101, 105, 105, 105, 105,
1531 UNK, 110, 111, 111, 111, 111, 124, 47, 111, 117, 117, 117, 126, 121, UNK, 121
1535 yl1ch[] = { /* Latin-1 to Swiss ISO 646 */
1536 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1537 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1538 32, 33, 34, UNK, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1539 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1540 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1541 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, UNK, UNK, UNK, UNK, UNK,
1542 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1543 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, 127,
1544 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1545 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1546 32, 33, UNK, UNK, UNK, UNK, UNK, UNK, 34, 67, UNK, 34, UNK, 45, 82, UNK,
1547 UNK, UNK, UNK, UNK, 39, 117, UNK, UNK, 44, UNK, UNK, 34, UNK, UNK, UNK, 63,
1548 65, 65, 65, 65, 65, 65, 65, 67, 69, 69, 69, 69, 73, 73, 73, 73,
1549 UNK, 78, 79, 79, 79, 79, 79, 120, 79, 85, 85, 85, 85, 89, UNK, 115,
1550 64, 97, 97, 97, 123, 97, 97, 92, 95, 91, 93, 101, 105, 105, 94, 105,
1551 UNK, 110, 111, 111, 96, 111, 124, 47, 111, 35, 117, 126, 125, 121, UNK, 121
1555 yl1dm[] = { /* Latin-1 to DEC Multinational Character Set */
1556 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1557 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1558 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1559 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1560 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1561 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1562 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1563 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1564 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1565 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1566 32, 161, 162, 163, 168, 165, 124, 167, 34, 169, 170, 171, 126, UNK, 82, UNK,
1567 176, 177, 178, 179, 39, 181, 182, 183, 44, 185, 186, 187, 188, 189, UNK, 191,
1568 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1569 UNK, 209, 210, 211, 212, 213, 214, 120, 216, 217, 218, 219, 220, 221, UNK, 223,
1570 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1571 UNK, 241, 242, 243, 244, 245, 246, 47, 248, 249, 250, 251, 252, UNK, UNK, 253
1575 yl1dg[] = { /* Latin-1 to Data General International Character Set */
1576 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1577 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1578 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1579 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1580 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1581 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1582 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1583 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1584 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1585 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1586 160, 171, 167, 168, 166, 181, 191, 187, 189, 173, 169, 177, 161, 255, 174, 175,
1587 188, 182, 164, 165, 190, 163, 178, 185, 186, 179, 170, 176, 223, 162, 220, 172,
1588 193, 192, 194, 196, 195, 197, 198, 199, 201, 200, 202, 203, 205, 204, 206, 207,
1589 184, 208, 210, 209, 211, 213, 212, 215, 214, 217, 216, 218, 219, 221, 222, 252,
1590 225, 224, 226, 228, 227, 229, 230, 231, 233, 232, 234, 235, 237, 236, 238, 239,
1591 183, 240, 242, 241, 243, 245, 244, 247, 246, 249, 248, 250, 251, 180, 254, 253
1595 /* Local file character sets to ISO Latin Alphabet 1 */
1599 yasl1[] = { /* ASCII to Latin-1 */
1600 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1601 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1602 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1603 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1604 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1605 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1606 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1607 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127
1609 #endif /* NOTUSED */
1612 yaql1[] = { /* Extended Mac Latin (based on Apple Quickdraw) to Latin-1 */
1613 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1614 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1615 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1616 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1617 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1618 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1619 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1620 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1621 196, 197, 199, 201, 209, 214, 220, 225, 224, 226, 228, 227, 229, 231, 233, 232,
1622 234, 235, 237, 236, 238, 239, 241, 243, 242, 244, 246, 245, 250, 249, 251, 252,
1623 221, 176, 162, 163, 167, 215, 182, 223, 174, 169, 178, 180, 168, 179, 198, 216,
1624 185, 177, 188, 189, 165, 181, 128, 129, 130, 131, 190, 170, 186, 132, 230, 248,
1625 191, 161, 172, 142, 133, 134, 135, 171, 187, 166, 160, 192, 195, 213, 136, 137,
1626 173, 144, 138, 139, 143, 146, 247, 145, 255, 140, 141, 164, 208, 240, 222, 254,
1627 253, 183, 147, 148, 149, 194, 202, 193, 203, 200, 205, 206, 207, 204, 211, 212,
1628 150, 210, 218, 219, 217, 151, 152, 153, 175, 154, 155, 156, 184, 157, 158, 159
1632 ydul1[] = { /* Dutch ISO 646 to Latin-1 */
1633 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1634 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1635 32, 33, 34, 163, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1636 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1637 190, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1638 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 255, 189, 124, 94, 95,
1639 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1640 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 168, 164, 188, 39, 127
1644 yfil1[] = { /* Finnish NRC (*not* ISO-646) to Latin-1 */
1645 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1646 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1647 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1648 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1649 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1650 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 196, 214, 197, 220, 95,
1651 233, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1652 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246, 229, 252, 127
1656 yfrl1[] = { /* French ISO 646 to Latin-1 */
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, 163, 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 224, 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, 176, 231, 167, 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, 233, 249, 232, 168, 127
1668 yfcl1[] = { /* French-Canadian ISO 646 to Latin-1 */
1669 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1670 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1671 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1672 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1673 224, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1674 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 226, 231, 234, 238, 95,
1675 244, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1676 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 233, 249, 232, 251, 127
1680 ygel1[] = { /* German ISO 646 to Latin-1 */
1681 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1682 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1683 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1684 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1685 167, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1686 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 196, 214, 220, 94, 95,
1687 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1688 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246, 252, 223, 127
1692 yitl1[] = { /* Italian ISO 646 to Latin-1 */
1693 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1694 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1695 32, 33, 34, 163, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1696 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1697 167, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1698 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 176, 231, 233, 94, 95,
1699 249, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1700 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 224, 242, 232, 236, 127
1704 ynel1[] = { /* NeXT to Latin-1 */
1705 /* NEED TO MAKE THIS ONE INVERTIBLE */
1706 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1707 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1708 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1709 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1710 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1711 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1712 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1713 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1714 160, 192, 193, 194, 195, 196, 197, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1715 208, 209, 210, 211, 212, 213, 214, 217, 218, 219, 220, 221, 222, 181, 215, 247,
1716 169, 161, 162, 163, UNK, 165, UNK, 167, 164, UNK, UNK, 171, UNK, UNK, UNK, UNK,
1717 174, UNK, UNK, UNK, 183, 166, 182, UNK, UNK, UNK, UNK, 187, UNK, UNK, 172, 191,
1718 185, 96, 180, 94, 126, 175, UNK, UNK, 168, 178, 176, 184, 179, UNK, UNK, UNK,
1719 UNK, 177, 188, 189, 190, 224, 225, 226, 227, 228, 229, 231, 232, 233, 234, 235,
1720 236, 198, 237, 170, 238, 239, 240, 241, UNK, 216, UNK, 186, 242, 243, 244, 245,
1721 246, 230, 249, 250, 251, UNK, 252, 253, UNK, 248, UNK, 223, 254, 255, UNK, UNK
1725 ynol1[] = { /* Norwegian/Danish ISO 646 to Latin-1 */
1726 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1727 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1728 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1729 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1730 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1731 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 198, 216, 197, 94, 95,
1732 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1733 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 230, 248, 229, 126, 127
1737 ypol1[] = { /* Portuguese ISO 646 to Latin-1 */
1738 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1739 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1740 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1741 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1742 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1743 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 195, 199, 213, 94, 95,
1744 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1745 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 227, 231, 245, 126, 127
1749 yspl1[] = { /* Spanish ISO 646 to Latin-1 */
1750 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1751 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1752 32, 33, 34, 163, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1753 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1754 167, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1755 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 161, 209, 191, 94, 95,
1756 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1757 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 176, 241, 231, 126, 127
1761 yswl1[] = { /* Swedish ISO 646 to Latin-1 */
1762 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1763 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1764 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1765 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1766 201, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1767 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 196, 214, 197, 220, 95,
1768 233, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1769 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246, 229, 252, 127
1773 ychl1[] = { /* Swiss ISO 646 to Latin-1 */
1774 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1775 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1776 32, 33, 34, 249, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1777 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1778 224, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1779 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 233, 231, 234, 238, 232,
1780 244, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1781 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 228, 246, 252, 251, 127
1785 yhul1[] = { /* Hungarian ISO 646 to Latin-1 */
1786 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1787 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1788 32, 33, 34, 35, 164, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1789 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1790 193, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1791 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 201, 214, 220, 94, 95,
1792 225, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1793 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 233, 246, 252, 34, 127
1797 ydml1[] = { /* DEC Multinational Character Set to Latin-1 */
1798 /* Note: This is a null translation */
1799 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1800 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1801 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1802 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1803 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1804 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1805 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1806 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1807 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1808 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1809 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
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 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1814 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
1818 ydgl1[] = { /* Data General International to Latin-1 */
1819 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1820 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1821 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1822 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1823 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1824 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1825 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1826 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1827 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1828 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1829 160, 172, 189, 181, 178, 179, 164, 162, 163, 170, 186, 161, 191, 169, 174, 175,
1830 187, 171, 182, 185, 253, 165, 177, 240, 208, 183, 184, 167, 176, 168, 180, 166,
1831 193, 192, 194, 196, 195, 197, 198, 199, 201, 200, 202, 203, 205, 204, 206, 207,
1832 209, 211, 210, 212, 214, 213, 216, 215, 218, 217, 219, 220, 190, 221, 222, 188,
1833 225, 224, 226, 228, 227, 229, 230, 231, 233, 232, 234, 235, 237, 236, 238, 239,
1834 241, 243, 242, 244, 246, 245, 248, 247, 250, 249, 251, 252, 223, 255, 254, 173
1838 /* Translation tables for Cyrillic character sets */
1842 ylcac[] = { /* Latin/Cyrillic to CP866 */
1843 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1844 16, 17, 18, 19, 208, 209, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1845 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1846 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1847 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1848 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1849 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1850 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1851 196, 179, 192, 217, 191, 218, 195, 193, 180, 194, 197, 176, 177, 178, 211, 216,
1852 205, 186, 200, 188, 187, 201, 204, 202, 185, 203, 206, 223, 220, 219, 254, UNK,
1853 255, 240, 132, 131, 242, 83, 73, 244, 74, 139, 141, 151, 138, 45, 246, 135,
1854 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1855 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1856 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
1857 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1858 252, 241, 164, 163, 243, 115, 105, 245, 106, 171, 173, 231, 170, 21, 247, 167
1862 ylc55[] = { /* Latin/Cyrillic to CP855 (inverse of y55lc) */
1863 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1864 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1865 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1866 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1867 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1868 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1869 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1870 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1871 174, 175, 176, 177, 178, 179, 180, 185, 186, 187, 188, 191, 192, 193, 194, 195,
1872 196, 197, 200, 201, 202, 203, 204, 205, 206, 207, 217, 218, 219, 220, 223, 254,
1873 255, 133, 129, 131, 135, 137, 139, 141, 143, 145, 147, 149, 151, 240, 153, 155,
1874 161, 163, 236, 173, 167, 169, 234, 244, 184, 190, 199, 209, 211, 213, 215, 221,
1875 226, 228, 230, 232, 171, 182, 165, 252, 246, 250, 159, 242, 238, 248, 157, 224,
1876 160, 162, 235, 172, 166, 168, 233, 243, 183, 189, 198, 208, 210, 212, 214, 216,
1877 225, 227, 229, 231, 170, 181, 164, 251, 245, 249, 158, 241, 237, 247, 156, 222,
1878 239, 132, 128, 130, 134, 136, 138, 140, 142, 144, 146, 148, 150, 253, 152, 154
1882 ylc1251[] = { /* Latin/Cyrillic to CP1251 (inverse of y1251lc) */
1883 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1884 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1885 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1886 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1887 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1888 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1889 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1890 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1891 130, 132, 133, 134, 135, 136, 137, 139, 145, 146, 147, 148, 149, 150, 151, 152,
1892 153, 155, 164, 165, 166, 169, 171, 172, 174, 176, 177, 180, 181, 182, 183, 187,
1893 160, 168, 128, 129, 170, 189, 178, 175, 163, 138, 140, 142, 141, 173, 161, 143,
1894 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1895 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1896 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1897 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255,
1898 185, 184, 144, 131, 186, 190, 179, 191, 188, 154, 156, 158, 157, 167, 162, 159
1902 ylcbu[] = { /* Latin/Cyrillic to Bulgarian PC Code Page */
1903 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1904 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1905 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1906 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1907 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1908 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1909 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1910 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1911 255, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206,
1912 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1913 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1914 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
1915 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1916 213, 207, 208, 209, 210, 211, 212, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1917 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1918 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 214, 253, 254
1922 ylck8[] = { /* Latin/Cyrillic to Old KOI-8 Cyrillic */
1923 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1924 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1925 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1926 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1927 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1928 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1929 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1930 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1931 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
1932 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
1933 UNK, 229, UNK, UNK, UNK, 83, 73, 73, 74, UNK, UNK, UNK, 235, UNK, 245, UNK,
1934 225, 226, 247, 231, 228, 229, 246, 250, 233, 234, 235, 236, 237, 238, 239, 240,
1935 242, 243, 244, 245, 230, 232, 227, 254, 251, 253, 255, 249, 248, 252, 224, 241,
1936 193, 194, 215, 199, 196, 197, 214, 218, 201, 202, 203, 204, 205, 206, 207, 208,
1937 210, 211, 212, 213, 198, 200, 195, 222, 219, 221, 223, 217, 216, 220, 192, 209,
1938 UNK, 197, UNK, UNK, UNK, 115, 105, 105, 106, UNK, UNK, UNK, 203, UNK, 213, UNK
1942 yaclc[] = { /* CP866 to Latin/Cyrillic */
1943 /* NEED TO MAKE THIS ONE INVERTIBLE */
1944 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1945 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1946 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1947 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1948 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1949 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1950 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1951 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1952 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1953 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1954 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1955 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1956 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1957 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
1958 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
1959 161, 241, 164, 244, 167, 247, 174, 254, UNK, UNK, UNK, UNK, 240, UNK, UNK, UNK
1963 y55lc[] = { /* CP855 to Latin/Cyrillic (inverse of ylc55) */
1964 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1965 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1966 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1967 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1968 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1969 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1970 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1971 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1972 242, 162, 243, 163, 241, 161, 244, 164, 245, 165, 246, 166, 247, 167, 248, 168,
1973 249, 169, 250, 170, 251, 171, 252, 172, 254, 174, 255, 175, 238, 206, 234, 202,
1974 208, 176, 209, 177, 230, 198, 212, 180, 213, 181, 228, 196, 211, 179, 128, 129,
1975 130, 131, 132, 133, 134, 229, 197, 216, 184, 135, 136, 137, 138, 217, 185, 139,
1976 140, 141, 142, 143, 144, 145, 218, 186, 146, 147, 148, 149, 150, 151, 152, 153,
1977 219, 187, 220, 188, 221, 189, 222, 190, 223, 154, 155, 156, 157, 191, 239, 158,
1978 207, 224, 192, 225, 193, 226, 194, 227, 195, 214, 182, 210, 178, 236, 204, 240,
1979 173, 235, 203, 215, 183, 232, 200, 237, 205, 233, 201, 231, 199, 253, 159, 160
1983 y1251lc[] = { /* CP1251 to Latin/Cyrillic (inverse of ylc1251) */
1984 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
1985 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1986 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
1987 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
1988 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
1989 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
1990 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
1991 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
1992 162, 163, 128, 243, 129, 130, 131, 132, 133, 134, 169, 135, 170, 172, 171, 175,
1993 242, 136, 137, 138, 139, 140, 141, 142, 143, 144, 249, 145, 250, 252, 251, 255,
1994 160, 174, 254, 168, 146, 147, 148, 253, 161, 149, 164, 150, 151, 173, 152, 167,
1995 153, 154, 166, 246, 155, 156, 157, 158, 241, 240, 244, 159, 248, 165, 245, 247,
1996 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
1997 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
1998 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
1999 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239
2003 ybulc[] = { /* Bulgarian PC Code Page to Latin/Cyrillic */
2004 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2005 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2006 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2007 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2008 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2009 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2010 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2011 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2012 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2013 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
2014 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
2015 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
2016 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 209,
2017 210, 211, 212, 213, 214, 208, 253, 215, 216, 217, 218, 219, 220, 221, 222, 223,
2018 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
2019 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 254, 255, 128
2023 yk8lc[] = { /* Old KOI-8 Cyrillic to Latin/Cyrillic */
2024 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2025 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2026 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2027 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2028 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2029 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2030 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2031 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2032 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2033 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2034 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2035 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2036 238, 208, 209, 230, 212, 213, 228, 211, 229, 216, 217, 218, 219, 220, 221, 222,
2037 223, 239, 224, 225, 226, 227, 214, 210, 236, 235, 215, 232, 237, 233, 231, 234,
2038 206, 176, 177, 198, 180, 181, 196, 179, 197, 184, 185, 186, 187, 188, 189, 190,
2039 191, 207, 192, 193, 194, 195, 182, 178, 204, 203, 183, 200, 205, 201, 199, 127
2043 ylcsk[] = { /* Latin/Cyrillic to Short KOI */
2044 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2045 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2046 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2047 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2048 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2049 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2050 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2051 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 127,
2052 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2053 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2054 32, 101, UNK, UNK, UNK, 83, 73, 73, 74, UNK, UNK, UNK, 107, 45, 117, UNK,
2055 97, 98, 119, 103, 100, 101, 118, 122, 105, 106, 107, 108, 109, 110, 111, 112,
2056 114, 115, 116, 117, 102, 104, 99, 126, 123, 125, 39, 121, 120, 124, 96, 113,
2057 97, 98, 119, 103, 100, 101, 118, 122, 105, 106, 107, 108, 109, 110, 111, 112,
2058 114, 115, 116, 117, 102, 104, 99, 126, 123, 125, 39, 121, 120, 124, 96, 113,
2059 UNK, 101, UNK, UNK, UNK, 83, 73, 73, 74, UNK, UNK, UNK, 107, UNK, 117, UNK
2062 CONST CHAR yskcy[] = { /* Short KOI to Latin/Cyrillic */
2063 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2064 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2065 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2066 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2067 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2068 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2069 206, 176, 177, 198, 180, 181, 196, 179, 197, 184, 185, 186, 187, 188, 189, 190,
2070 191, 207, 192, 193, 194, 195, 182, 178, 204, 203, 183, 200, 205, 201, 199, 127
2072 #endif /* CYRILLIC */
2076 /* Latin-2 tables */
2079 yl252[] = { /* Latin-2 to Code Page 852 */
2080 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2081 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2082 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2083 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2084 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2085 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2086 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2087 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2088 174, 175, 176, 177, 178, 179, 180, 185, 186, 187, 188, 191, 192, 193, 194, 195,
2089 196, 197, 200, 201, 202, 203, 204, 205, 206, 217, 218, 219, 220, 223, 240, 254,
2090 255, 164, 244, 157, 207, 149, 151, 245, 249, 230, 184, 155, 141, 170, 166, 189,
2091 248, 165, 242, 136, 239, 150, 152, 243, 247, 231, 173, 156, 171, 241, 167, 190,
2092 232, 181, 182, 198, 142, 145, 143, 128, 172, 144, 168, 211, 183, 214, 215, 210,
2093 209, 227, 213, 224, 226, 138, 153, 158, 252, 222, 233, 235, 154, 237, 221, 225,
2094 234, 160, 131, 199, 132, 146, 134, 135, 159, 130, 169, 137, 216, 161, 140, 212,
2095 208, 228, 229, 162, 147, 139, 148, 246, 253, 133, 163, 251, 129, 236, 238, 250
2099 y52l2[] = { /* Code Page 852 to Latin-2 */
2100 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2101 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2102 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2103 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2104 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2105 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2106 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2107 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2108 199, 252, 233, 226, 228, 249, 230, 231, 179, 235, 213, 245, 238, 172, 196, 198,
2109 201, 197, 229, 244, 246, 165, 181, 166, 182, 214, 220, 171, 187, 163, 215, 232,
2110 225, 237, 243, 250, 161, 177, 174, 190, 202, 234, 173, 188, 200, 186, 128, 129,
2111 130, 131, 132, 133, 134, 193, 194, 204, 170, 135, 136, 137, 138, 175, 191, 139,
2112 140, 141, 142, 143, 144, 145, 195, 227, 146, 147, 148, 149, 150, 151, 152, 164,
2113 240, 208, 207, 203, 239, 210, 205, 206, 236, 153, 154, 155, 156, 222, 217, 157,
2114 211, 223, 212, 209, 241, 242, 169, 185, 192, 218, 224, 219, 253, 221, 254, 180,
2115 158, 189, 178, 183, 162, 167, 247, 184, 176, 168, 255, 251, 216, 248, 159, 160
2119 yl21250[] = { /* Latin-2 to Code Page 1250 */
2120 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2121 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2122 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2123 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2124 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2125 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2126 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2127 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2128 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 139, 144, 145, 146, 147, 148,
2129 149, 150, 151, 152, 153, 155, 166, 169, 171, 172, 174, 177, 181, 182, 183, 187,
2130 160, 165, 162, 163, 164, 188, 140, 167, 168, 138, 170, 141, 143, 173, 142, 175,
2131 176, 185, 178, 179, 180, 190, 156, 161, 184, 154, 186, 157, 159, 189, 158, 191,
2132 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
2133 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
2134 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
2135 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
2139 y1250l2[] = { /* Code Page 1250 to Latin-2 */
2140 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2141 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2142 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2143 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2144 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2145 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2146 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2147 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2148 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 169, 138, 166, 171, 174, 172,
2149 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 185, 149, 182, 187, 190, 188,
2150 160, 183, 162, 163, 164, 161, 150, 167, 168, 151, 170, 152, 153, 173, 154, 175,
2151 176, 155, 178, 179, 180, 156, 157, 158, 184, 177, 186, 159, 165, 189, 181, 191,
2152 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
2153 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
2154 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
2155 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255
2159 yl2mz[] = { /* Latin-2 to Mazovia (NOT invertible) */
2160 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2161 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2162 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2163 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2164 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2165 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2166 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2167 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2168 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2169 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2170 255, 143, UNK, 156, 155, 76, 152, 21, 34, 83, 83, 84, 160, 45, 90, 161,
2171 248, 134, 44, 146, 39, 108, 158, UNK, 44, 115, 115, 116, 166, 34, 122, 167,
2172 82, 65, 65, 65, 142, 76, 149, 128, 67, 69, 144, 69, 69, 73, 73, 68,
2173 68, 165, 78, 163, 79, 153, 153, 250, 82, 85, 85, 154, 154, 89, 84, 225,
2174 114, 97, 131, 97, 132, 108, 141, 135, 99, 130, 145, 137, 101, 105, 140, 101,
2175 100, 164, 110, 162, 147, 148, 148, 246, 114, 117, 117, 129, 129, 121, 116, 249
2179 ymzl2[] = { /* Mazovia to Latin-2 (NOT INVERTIBLE) */
2180 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2181 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2182 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2183 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2184 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2185 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2186 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2187 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2188 128, 252, 233, 226, 228, 97, 177, 231, 101, 235, 101, 105, 238, 230, 196, 161,
2189 202, 234, 179, 244, 246, 198, 117, 117, 166, 214, 220, 164, 163, 89, 182, 102,
2190 172, 175, 243, 211, 242, 210, 188, 191, 63, UNK, UNK, UNK, UNK, 33, 34, 34,
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,
2195 UNK, UNK, UNK, UNK, UNK, UNK, 247, UNK, 176, 255, 215, UNK, UNK, UNK, UNK, 160
2199 yl2l1[] = { /* Latin-2 to Latin-1 */
2200 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2201 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2202 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2203 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2204 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2205 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2206 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2207 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2208 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2209 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2210 160, 'A', UNK, 'L', 164, 'L', 'S', 167, 168, 'S', 'S', 'T', 'Z', 173, 'Z', 'Z',
2211 176, 'a', UNK, 'l', 180, 'l', 's', UNK, 184, 's', 's', 't', 'z', UNK, 'z', 'z',
2212 'R', 193, 194, 'A', 196, 'L', 'C', 199, 'C', 201, 'E', 203, 'E', 205, 'I', 'D',
2213 208, 'N', 'N', 211, 212, 'O', 214, 215, 'R', 'U', 218, 'U', 220, 221, 'T', 223,
2214 'r', 225, 226, 'a', 228, 'l', 'c', 231, 'c', 233, 'e', 235, 'e', 237, 'i', 'd',
2215 240, 'n', 'n', 243, 244, 'o', 246, 247, 'r', 'u', 250, 'u', 252, 253, 't', '.'
2219 yl1l2[] = { /* Latin-1 to Latin-2 */
2220 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2221 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2222 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2223 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2224 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2225 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2226 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2227 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2228 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2229 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
2230 160, 'A', UNK, 'L', 164, UNK, UNK, 167, 168, 'C', 'a', '<', '>', 173, 'R', UNK,
2231 176, UNK, UNK, UNK, 180, UNK, UNK, UNK, 184, UNK, 'o', '>', UNK, UNK, UNK, UNK,
2232 'A', 193, 194, 'A', 196, 'A', 'A', 199, 'E', 201, 'E', 203, 'I', 205, 'I', 'I',
2233 208, 'N', 'O', 211, 212, 'O', 214, 215, 'O', 'U', 218, 'U', 220, 221, UNK, 223,
2234 'a', 225, 226, 'a', 228, 'a', 'a', 231, 'e', 233, 'e', 235, 'i', 237, 'i', 'i',
2235 240, 'n', 'o', 243, 244, 'o', 246, 247, 'o', 'u', 250, 'u', 252, 253, UNK, 'y'
2239 yl2as[] = { /* Latin-2 to ASCII */
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 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2249 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2250 32, 'A', UNK, 'L', UNK, 'L', 'S', UNK, 34, 'S', 'S', 'T', 'Z', '-', 'Z', 'Z',
2251 UNK, 'a', UNK, 'l', 39, 'l', 's', UNK, 44, 's', 's', 't', 'z', UNK, 'z', 'z',
2252 'R', 'A', 'A', 'A', 'A', 'L', 'C', 'C', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'D',
2253 'D', 'N', 'N', 'O', 'O', 'O', 'O', 'x', 'R', 'U', 'U', 'U', 'U', 'Y', 'T', 's',
2254 'r', 'a', 'a', 'a', 'a', 'l', 'c', 'c', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'd',
2255 'd', 'n', 'n', 'o', 'o', 'o', 'o', '/', 'r', 'u', 'u', 'u', 'u', 'y', 't', '.'
2261 8-bit Tables providing invertible translation between Latin/Hebrew and CP862.
2264 y62lh[] = { /* PC Code Page 862 to ISO 8859-8 Latin/Hebrew */
2265 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2266 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2267 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2268 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2269 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2270 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2271 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2272 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2273 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
2274 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 162, 163, 165, 128, 129,
2275 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 172, 189, 188, 140, 171, 187,
2276 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
2277 157, 158, 159, 161, 164, 166, 167, 168, 169, 170, 173, 174, 175, 223, 179, 180,
2278 182, 184, 185, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
2279 203, 204, 205, 206, 207, 208, 181, 209, 210, 211, 212, 213, 214, 215, 216, 217,
2280 218, 177, 219, 220, 221, 222, 186, 251, 176, 183, 252, 253, 254, 178, 255, 160
2284 ylh62[] = { /* ISO 8859-8 Latin/Hebrew to PC Code Page 862 */
2285 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2286 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2287 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2288 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2289 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2290 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2291 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2292 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2293 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 173, 176, 177, 178,
2294 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194,
2295 255, 195, 155, 156, 196, 157, 197, 198, 199, 200, 201, 174, 170, 202, 203, 204,
2296 248, 241, 253, 206, 207, 230, 208, 249, 209, 210, 246, 175, 172, 171, 211, 212,
2297 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228,
2298 229, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 242, 243, 244, 245, 205,
2299 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
2300 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 247, 250, 251, 252, 254
2303 7-bit table providing readable translation from DEC Hebrew-7 to CP862.
2307 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2308 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2309 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2310 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2311 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2312 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2313 UNK, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2314 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127
2317 8-bit table providing readable translation from CP862 to Hebrew-7.
2320 y62h7[] = { /* PC Code Page 862 to Hebrew-7 */
2321 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2322 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2323 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2324 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2325 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2326 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2327 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2328 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127,
2329 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2330 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, UNK,
2331 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2332 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2333 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2334 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2335 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2336 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK
2339 7-bit table providing readable translation from Hebrew-7 to ISO Latin/Hebrew.
2343 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2344 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2345 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2346 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2347 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2348 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2349 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
2350 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 123, 124, 125, 126, 127
2353 8-bit table providing readable translation from ISO Latin/Hebrew to Hebrew-7.
2356 ylhh7[] = { /* Latin/Hebrew to Hebrew-7 */
2357 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2358 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2359 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2360 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2361 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2362 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2363 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2364 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127,
2365 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2366 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2367 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2368 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2369 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2370 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2371 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2372 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, UNK, UNK, UNK, UNK, UNK
2378 8-bit Tables providing invertible translation between Latin/Greek and CP869.
2381 ylg69[] = { /* ISO 8859-7 Latin/Greek to PC Code Page 869 */
2382 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2383 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2384 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2385 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2386 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2387 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2388 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2389 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2390 135, 147, 148, 176, 177, 178, 179, 180, 185, 186, 187, 188, 191, 192, 193, 194,
2391 195, 196, 197, 200, 201, 202, 203, 204, 205, 206, 217, 218, 219, 220, 223, 254,
2392 255, 139, 140, 156, 128, 129, 138, 245, 249, 151, 130, 174, 137, 240, 131, 142,
2393 248, 241, 153, 154, 239, 247, 134, 136, 141, 143, 144, 175, 146, 171, 149, 152,
2394 161, 164, 165, 166, 167, 168, 169, 170, 172, 173, 181, 182, 183, 184, 189, 190,
2395 198, 199, 132, 207, 208, 209, 210, 211, 212, 213, 145, 150, 155, 157, 158, 159,
2396 252, 214, 215, 216, 221, 222, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233,
2397 234, 235, 237, 236, 238, 242, 243, 244, 246, 250, 160, 251, 162, 163, 253, 133
2401 y69lg[] = { /* PC Code Page 869 to ISO 8859-7 Latin/Greek */
2402 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2403 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2404 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2405 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2406 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2407 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2408 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2409 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
2410 164, 165, 170, 174, 210, 255, 182, 128, 183, 172, 166, 161, 162, 184, 175, 185,
2411 186, 218, 188, 129, 130, 190, 219, 169, 191, 178, 179, 220, 163, 221, 222, 223,
2412 250, 192, 252, 253, 193, 194, 195, 196, 197, 198, 199, 189, 200, 201, 171, 187,
2413 131, 132, 133, 134, 135, 202, 203, 204, 205, 136, 137, 138, 139, 206, 207, 140,
2414 141, 142, 143, 144, 145, 146, 208, 209, 147, 148, 149, 150, 151, 152, 153, 211,
2415 212, 213, 214, 215, 216, 217, 225, 226, 227, 154, 155, 156, 157, 228, 229, 158,
2416 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 243, 242, 244, 180,
2417 173, 177, 245, 246, 247, 167, 248, 181, 176, 168, 249, 251, 224, 254, 159, 160
2420 7-bit table providing readable translation from ELOT 927 to CP869.
2424 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2425 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2426 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2427 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2428 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2429 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2430 96, 164, 165, 166, 167, 168, 169, 170, 172, 173, 181, 182, 183, 184, 189, 190,
2431 198, 199, 207, 208, 209, 210, 211, 212, 213, 32, 32, 23, 124, 125, 126, 127
2434 8-bit table providing readable translation from CP869 to ELOT 927.
2437 y69eg[] = { /* PC Code Page 869 to ELOT 927 */
2438 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2439 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2440 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2441 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2442 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2443 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2444 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2445 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127,
2446 UNK, UNK, UNK, UNK, UNK, UNK, 97, UNK, 46, UNK, 124, 39, 39, 101, 45, 103,
2447 105, 105, 111, UNK, UNK, 116, 116, UNK, 120, 50, 51, 97, UNK, 101, 103, 105,
2448 105, 105, 111, 116, 97, 98, 99, 100, 101, 102, 103, UNK, 104, 105, 34, 34,
2449 UNK, UNK, UNK, UNK, UNK, 106, 107, 108, 109, UNK, UNK, UNK, UNK, 110, 111, UNK,
2450 UNK, UNK, UNK, UNK, UNK, UNK, 112, 113, UNK, UNK, UNK, UNK, UNK, UNK, UNK, 114,
2451 115, 116, 117, 118, 119, 120, 97, 98, 99, UNK, UNK, UNK, UNK, 100, 101, UNK,
2452 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 39,
2453 45, UNK, 116, 117, 118, UNK, 119, UNK, UNK, UNK, 120, 116, 116, 120, UNK, 32
2457 7-bit table providing readable translation from ELOT 927 to ISO Latin/Greek.
2461 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2462 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2463 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2464 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2465 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2466 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2467 96, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
2468 208, 209, 211, 212, 213, 214, 215, 216, 217, 32, 32, 123, 124, 125, 126, 127
2471 8-bit table providing readable translation from ISO Latin/Greek to ELOT 927.
2474 ylgeg[] = { /* Latin/Greek to ELOT 927 */
2475 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
2476 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
2477 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
2478 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
2479 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2480 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
2481 96, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
2482 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 123, 124, 125, 126, 127,
2483 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2484 UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK, UNK,
2485 32, 39, 39, UNK, UNK, UNK, 124, UNK, 34, UNK, UNK, 34, UNK, 45, UNK, 45,
2486 UNK, UNK, 50, 51, 39, UNK, 97, 46, 101, 103, 105, 34, 111, UNK, 116, 120,
2487 UNK, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2488 112, 113, UNK, 114, 115, 116, 117, 118, 119, 120, 105, 116, 97, 101, 103, 105,
2489 116, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
2490 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 105, 116, 111, 116, 120, UNK
2494 /* Translation functions ... */
2496 CHAR /* The identity function... */
2498 ident(CHAR c) /* (no longer used) */
2501 #endif /* CK_ANSIC */
2503 return(c); /* Instead, enter NULL in the */
2504 } /* table of functions to avoid */
2505 /* needless function calls. */
2512 #endif /* CK_ANSIC */
2514 return((c < 128) ? c : '?');
2522 #endif /* CK_ANSIC */
2524 return((c < 160) ? c : '?');
2533 #endif /* CK_ANSIC */
2534 { /* xl1as */ /* Latin-1 to US ASCII... */
2535 switch(langs[language].id) {
2538 if (c == 255) { /* Dutch umlaut-y */
2539 zmstuff('j'); /* becomes ij */
2541 } else return(yl1as[c]); /* all others by the book */
2544 switch (c) { /* German, special rules. */
2545 case 196: /* umlaut-A -> Ae */
2548 case 214: /* umlaut-O -> Oe */
2551 case 220: /* umlaut-U -> Ue */
2554 case 228: /* umlaut-a -> ae */
2557 case 246: /* umlaut-o -> oe */
2560 case 252: /* umlaut-u -> ue */
2563 case 223: /* ess-zet -> ss */
2566 default: return(yl1as[c]); /* all others by the book */
2572 switch (c) { /* Scandanavian languages. */
2573 case 196: /* umlaut-A -> Ae */
2574 case 198: /* AE ligature also -> Ae */
2577 case 214: /* umlaut-O -> Oe */
2578 case 216: /* O-slash -> Oe */
2581 case 220: /* umlaut-U -> Ue */
2582 /* return('Y'); replaced by "Ue" by popular demand. */
2583 /* Y for Umlaut-U is only used in German names. */
2586 case 228: /* umlaut-a -> ae */
2587 case 230: /* ditto for ae ligature */
2590 case 246: /* umlaut-o -> oe */
2591 case 248: /* o-slash -> oe */
2594 case 252: /* umlaut-u -> ue */
2595 /* return('y'); replaced by "ue" by popular demand. */
2598 case 197: /* A-ring -> Aa */
2601 case 229: /* a-ring -> aa */
2604 default: return(yl1as[c]); /* All others by the book */
2606 case L_ICELANDIC: /* Icelandic. */
2608 case 198: /* uppercase AE -> AE */
2611 case 208: /* uppercase Eth -> D */
2613 case 214: /* uppercase O-diaeresis -> Oe */
2616 case 222: /* uppercase Thorn -> Th */
2619 case 230: /* lowercase ae -> ae */
2622 case 240: /* lowercase Eth -> d */
2624 case 246: /* lowercase O-diaeresis -> oe */
2627 case 254: /* lowercase Thorn -> th */
2630 default: return(yl1as[c]); /* All others by the book */
2633 return(yl1as[c]); /* None of the above, by the table. */
2637 CHAR /* CP1252 to ASCII */
2642 #endif /* CK_ANSIC */
2644 switch(c) { /* Microsoft name... */
2645 case 0x80: return('?'); /* Euro Sign */
2646 case 0x82: return('\047'); /* Single Low-9 Quotation Mark */
2647 case 0x83: return('f'); /* Latin Small Letter f with Hook */
2648 case 0x84: return('"'); /* Double low-9 Quotation Mark */
2649 case 0x85: return('-'); /* Horizontal Ellipsis */
2650 case 0x86: return('+'); /* Dagger */
2651 case 0x87: return('+'); /* Double Dagger */
2652 case 0x88: return('^'); /* Modifier Letter Circumflex Accent */
2653 case 0x89: return('?'); /* Per Mille Sign */
2654 case 0x8A: return('S'); /* Latin Capital Letter S with Caron */
2655 case 0x8B: return('<'); /* Single Left Angle Quotation Mark */
2656 case 0x8C: return('O'); /* Latin Capital Ligature OE */
2657 case 0x8E: return('Z'); /* Latin Capital Letter Z with Caron */
2658 case 0x91: return('\047'); /* Left Single Quotation Mark */
2659 case 0x92: return('\047'); /* Right Single Quotation Mark */
2660 case 0x93: return('"'); /* Left Double Quotation Mark */
2661 case 0x94: return('"'); /* Right Double Quotation Mark */
2662 case 0x95: return('.'); /* Bullet */
2663 case 0x96: return('-'); /* En Dash */
2664 case 0x97: return('-'); /* Em Dash */
2665 case 0x98: return('~'); /* Small Tilde */
2666 case 0x99: return('T'); /* Trade Mark Sign */
2667 case 0x9A: return('s'); /* Latin Small Letter s with Caron */
2668 case 0x9B: return('>'); /* Single Right Angle Quotation Mark */
2669 case 0x9C: return('o'); /* Latin Small Ligature OE */
2670 case 0x9E: return('z'); /* Latin Small Letter z with Caron */
2671 case 0x9F: return('Y'); /* Latin Capital Letter Y Diaeresis */
2673 if (c > 0x80 && c < 0xa0)
2680 CHAR /* CP1252 to Latin-1 */
2685 #endif /* CK_ANSIC */
2687 if (c == 0x95) return(0xb7); /* Middle dot */
2688 return((c < 160) ? xw1as(c) : c);
2691 CHAR /* Latin-1 to German */
2696 #endif /* CK_ANSIC */
2701 CHAR /* German to Latin-1 */
2706 #endif /* CK_ANSIC */
2718 #endif /* CK_ANSIC */
2719 { /* xgeas */ /* German ISO 646 to ASCII */
2723 case 91: /* umlaut-A -> Ae */
2726 case 92: /* umlaut-O -> Oe */
2729 case 93: /* umlaut-U -> Ue */
2732 case 123: /* umlaut-a -> ae */
2735 case 124: /* umlaut-o -> oe */
2738 case 125: /* umlaut-u -> ue */
2741 case 126: /* ess-zet -> ss */
2744 default: return(c); /* all others stay the same */
2753 #endif /* CK_ANSIC */
2754 { /* xl1w1 */ /* Latin-1 to CP1252 (Windows L1) */
2755 if (c > 127 && c < 160)
2766 #endif /* CK_ANSIC */
2767 { /* xduas */ /* Dutch ISO 646 to US ASCII */
2771 case 64: return(UNK); /* 3/4 */
2772 case 91: /* y-diaeresis */
2775 case 92: return(UNK); /* 1/2 */
2776 case 93: return(124); /* vertical bar */
2777 case 123: return(34); /* diaeresis */
2778 case 124: return(UNK); /* Florin */
2779 case 125: return(UNK); /* 1/4 */
2780 case 126: return(39); /* Apostrophe */
2790 #endif /* CK_ANSIC */
2791 { /* xfias */ /* Finnish ISO 646 to US ASCII */
2795 case 91: /* A-diaeresis */
2798 case 92: /* O-diaeresis */
2801 case 93: /* A-ring */
2804 case 94: /* U-diaeresis */
2808 case 96: /* e-acute */
2810 case 123: /* a-diaeresis */
2813 case 124: /* o-diaeresis */
2816 case 125: /* a-ring */
2819 case 126: /* u-diaeresis */
2833 #endif /* CK_ANSIC */
2834 { /* xfras */ /* French ISO 646 to US ASCII */
2838 case 64: return(97); /* a grave */
2839 case 91: return(UNK); /* degree sign */
2840 case 92: return(99); /* c cedilla */
2841 case 93: return(UNK); /* paragraph sign */
2842 case 123: return(101); /* e acute */
2843 case 124: return(117); /* u grave */
2844 case 125: return(101); /* e grave */
2845 case 126: return(34); /* diaeresis */
2855 #endif /* CK_ANSIC */
2856 { /* xfcas */ /* French Canadian ISO 646 to ASCII */
2860 case 64: return('a'); /* a grave */
2861 case 91: return('a'); /* a circumflex */
2862 case 92: return('c'); /* c cedilla */
2863 case 93: return('e'); /* e circumflex */
2864 case 94: return('i'); /* i circumflex */
2865 case 96: return('o'); /* o circumflex */
2866 case 123: return('e'); /* e acute */
2867 case 124: return('u'); /* u grave */
2868 case 125: return('e'); /* e grave */
2869 case 126: return('u'); /* u circumflex */
2879 #endif /* CK_ANSIC */
2880 { /* xitas */ /* Italian ISO 646 to ASCII */
2884 case 91: return(UNK); /* degree */
2885 case 92: return('c'); /* c cedilla */
2886 case 93: return('e'); /* e acute */
2887 case 96: return('u'); /* u grave */
2888 case 123: return('a'); /* a grave */
2889 case 124: return('o'); /* o grave */
2890 case 125: return('e'); /* e grave */
2891 case 126: return('i'); /* i grave */
2901 #endif /* CK_ANSIC */
2902 { /* xneas */ /* NeXT to ASCII */
2903 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
2904 if (c == 234) { /* handle OE digraph. */
2907 } else if (c == 250) { /* Also lowercase oe. */
2912 c = xnel1(c); /* Convert to Latin-1 */
2913 return(yl1as[c]); /* Convert Latin-1 to ASCII */
2921 #endif /* CK_ANSIC */
2922 { /* xnoas */ /* Norge/Danish ISO 646 to ASCII */
2927 zmstuff('E'); /* AE digraph */
2929 case 92: return('O'); /* O slash */
2930 case 93: /* A ring */
2933 case 123: /* ae digraph */
2936 case 124: return('o'); /* o slash */
2937 case 125: /* a ring */
2949 #endif /* CK_ANSIC */
2950 { /* xpoas */ /* Portuguese ISO 646 to ASCII */
2954 case 91: return('A'); /* A tilde */
2955 case 92: return('C'); /* C cedilla */
2956 case 93: return('O'); /* O tilde */
2957 case 123: return('a'); /* a tilde */
2958 case 124: return('c'); /* c cedilla */
2959 case 125: return('o'); /* o tilde */
2969 #endif /* CK_ANSIC */
2970 { /* xspas */ /* Spanish ISO 646 to ASCII */
2974 case 91: return(33); /* Inverted exclamation */
2975 case 92: return('N'); /* N tilde */
2976 case 93: return(63); /* Inverted question mark */
2977 case 123: return(UNK); /* degree */
2978 case 124: return('n'); /* n tilde */
2979 case 125: return('c'); /* c cedilla */
2989 #endif /* CK_ANSIC */
2990 { /* xswas */ /* Swedish ISO 646 to ASCII */
2994 case 64: return('E'); /* E acute */
2995 case 91: /* A diaeresis */
2998 case 92: /* O diaeresis */
3001 case 93: /* A ring */
3004 case 94: /* U diaeresis */
3008 case 96: return('e'); /* e acute */
3009 case 123: /* a diaeresis */
3012 case 124: /* o diaeresis */
3015 case 125: /* a ring */
3018 case 126: /* u diaeresis */
3031 #endif /* CK_ANSIC */
3032 { /* xchas */ /* Swiss ISO 646 to ASCII */
3036 case 35: return('u'); /* u grave */
3037 case 64: return('a'); /* a grave */
3038 case 91: return('e'); /* e acute */
3039 case 92: return('c'); /* c cedilla */
3040 case 93: return('e'); /* e circumflex */
3041 case 94: return('i'); /* i circumflex */
3042 case 95: return('e'); /* e grave */
3043 case 96: return('o'); /* o circumflex */
3044 case 123: /* a diaeresis */
3047 case 124: /* o diaeresis */
3050 case 125: /* u diaeresis */
3053 case 126: return('u'); /* u circumflex */
3063 #endif /* CK_ANSIC */
3064 { /* xhuas */ /* Hungarian ISO 646 to ASCII */
3068 case 64: return('A'); /* A acute */
3069 case 91: return('E'); /* E acute */
3070 case 92: return('O'); /* O diaeresis */
3071 case 93: return('U'); /* U diaeresis */
3072 case 96: return('a'); /* a acute */
3073 case 123: return('e'); /* e acute */
3074 case 124: return('o'); /* o acute */
3075 case 125: return('u'); /* u acute */
3076 case 126: return(34); /* double acute accent */
3086 #endif /* CK_ANSIC */
3087 { /* xdmas */ /* DEC MCS to ASCII */
3088 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3089 if (c == 215) { /* handle OE digraph. */
3092 } else if (c == 247) { /* Also lowercase oe. */
3097 return(yl1as[c]); /* Otherwise treat like Latin-1 */
3105 #endif /* CK_ANSIC */
3106 { /* xdgas */ /* Data General to ASCII */
3108 case 180: return('f'); /* Florin */
3109 case 183: return('<'); /* Less-equal */
3110 case 184: return('>'); /* Greater-equal */
3111 case 186: return(96); /* Grave accent */
3112 case 191: return('^'); /* Uparrow */
3114 if (langs[language].id == L_FRENCH) { /* OE digraph */
3119 if (langs[language].id == L_FRENCH) { /* oe digraph */
3123 case 175: case 179: case 220: case 222:
3124 case 223: case 254: case 255:
3126 default: /* The rest, convert to Latin-1 */
3127 return(yl1as[ydgl1[c]]); /* and from there to ASCII */
3136 #endif /* CK_ANSIC */
3137 { /* xr8as */ /* Hewlett Packard Roman8 to ASCII */
3139 case 175: return('L'); /* Lira */
3140 case 190: return('f'); /* Florin */
3141 case 235: return('S'); /* S caron */
3142 case 236: return('s'); /* s caron */
3143 case 246: return('-'); /* Horizontal bar */
3144 case 252: return('*'); /* Solid box */
3145 default: /* The rest, convert to Latin-1 */
3146 return(yl1as[yr8l1[c]]); /* and from there to ASCII */
3155 #endif /* CK_ANSIC */
3156 { /* xukl1 */ /* UK ASCII to Latin-1 */
3169 #endif /* CK_ANSIC */
3170 { /* xl1uk */ /* Latin-1 to UK ASCII */
3173 else return(yl1as[c]);
3176 CHAR /* Latin-1 to French ISO 646 */
3181 #endif /* CK_ANSIC */
3187 CHAR /* French ISO 646 to Latin-1 */
3192 #endif /* CK_ANSIC */
3199 CHAR /* Latin-1 to Dutch ASCII */
3204 #endif /* CK_ANSIC */
3214 #endif /* CK_ANSIC */
3215 { /* xdul1 */ /* Dutch ISO 646 to Latin-1 */
3226 #endif /* CK_ANSIC */
3227 { /* xfil1 */ /* Finnish ISO 646 to Latin-1 */
3238 #endif /* CK_ANSIC */
3239 { /* xl1fi */ /* Latin-1 to Finnish ISO 646 */
3248 #endif /* CK_ANSIC */
3249 { /* xfcl1 */ /* French Canadian ISO646 to Latin-1 */
3260 #endif /* CK_ANSIC */
3261 { /* xl1fc */ /* Latin-1 to French Canadian ISO646 */
3270 #endif /* CK_ANSIC */
3271 { /* xitl1 */ /* Italian ISO 646 to Latin-1 */
3282 #endif /* CK_ANSIC */
3283 { /* xl1it */ /* Latin-1 to Italian ISO 646 */
3292 #endif /* CK_ANSIC */
3293 { /* xnel1 */ /* NeXT to Latin-1 */
3294 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3295 if (c == 234) { /* handle OE digraph. */
3298 } else if (c == 250) { /* Also lowercase oe. */
3311 #endif /* CK_ANSIC */
3312 { /* xnel9 */ /* NeXT to Latin-9 */
3314 case 234: return(188); /* OE */
3315 case 250: return(189); /* oe */
3316 case 188: return(234); /* keep it invertible... */
3317 case 189: return(250); /* oe */
3328 #endif /* CK_ANSIC */
3329 { /* xl1ne */ /* Latin-1 to NeXT */
3338 #endif /* CK_ANSIC */
3339 { /* xl9ne */ /* Latin-9 to NeXT */
3341 case 188: return(234); /* OE */
3342 case 189: return(250); /* oe */
3343 case 234: return(188); /* OE */
3344 case 250: return(189); /* oe */
3355 #endif /* CK_ANSIC */
3356 { /* xnol1 */ /* Norway/Denmark ISO 646 to Latin-1 */
3367 #endif /* CK_ANSIC */
3368 { /* xl1no */ /* Latin-1 to Norway/Denmark ISO 646 */
3377 #endif /* CK_ANSIC */
3378 { /* xpol1 */ /* Portuguese ISO 646 to Latin-1 */
3389 #endif /* CK_ANSIC */
3390 { /* xl1po */ /* Latin-1 to Portuguese ISO 646 */
3399 #endif /* CK_ANSIC */
3400 { /* xspl1 */ /* Spanish ISO 646 to Latin-1 */
3411 #endif /* CK_ANSIC */
3412 { /* xl1sp */ /* Latin-1 to Spanish ISO 646 */
3421 #endif /* CK_ANSIC */
3422 { /* xswl1 */ /* Swedish ISO 646 to Latin-1 */
3433 #endif /* CK_ANSIC */
3434 { /* xl1sw */ /* Latin-1 to Swedish ISO 646 */
3443 #endif /* CK_ANSIC */
3444 { /* xchl1 */ /* Swiss ISO 646 to Latin-1 */
3455 #endif /* CK_ANSIC */
3456 { /* xl1ch */ /* Latin-1 to Swiss ISO 646 */
3465 #endif /* CK_ANSIC */
3466 { /* xhul1 */ /* Hungarian ISO 646 to Latin-1 */
3477 #endif /* CK_ANSIC */
3478 { /* xl1hu */ /* Latin-1 to Hungarian ISO 646 */
3487 #endif /* CK_ANSIC */
3488 { /* xl1dm */ /* Latin-1 to DEC MCS */
3497 #endif /* CK_ANSIC */
3498 { /* xl9dm */ /* Latin-9 to DEC MCS */
3500 case 188: return(215);
3501 case 189: return(247);
3502 case 215: return(188);
3503 case 247: return(189);
3514 #endif /* CK_ANSIC */
3515 { /* xl9w1 */ /* Latin-9 to CP1252 */
3521 case 0xa4: return(0x80); /* Euro */
3522 case 0xa6: return(0x8a); /* S-caron */
3523 case 0xa8: return(0x9a); /* s-caron */
3524 case 0xb4: return(0x8e); /* Z-caron */
3525 case 0xb8: return(0x9e); /* z-caron */
3526 case 0xbc: return(0x8c); /* OE */
3527 case 0xbd: return(0x9c); /* oe */
3528 case 0xbe: return(0x9f); /* Y-diaeresis */
3539 #endif /* CK_ANSIC */
3540 { /* xl1dg */ /* Latin-1 to DG ICS */
3549 #endif /* CK_ANSIC */
3550 { /* xdml1 */ /* DEC MCS to Latin-1 */
3551 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3552 if (c == 215) { /* handle OE digraph. */
3555 } else if (c == 247) { /* Also lowercase oe. */
3568 #endif /* CK_ANSIC */
3569 { /* xdml9 */ /* DEC MCS to Latin-9 */
3571 case 215: return(188); /* OE */
3572 case 247: return(189); /* oe */
3573 case 188: return(215); /* and swap the other two... */
3574 case 189: return(247); /* (1/4 and 1/2) */
3575 default: /* to keep it invertible */
3585 #endif /* CK_ANSIC */
3586 { /* xdgl1 */ /* DG International CS to Latin-1 */
3587 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3588 if (c == 215) { /* handle OE digraph. */
3591 } else if (c == 247) { /* Also lowercase oe. */
3604 #endif /* CK_ANSIC */
3605 { /* xr8l1 */ /* Hewlett Packard Roman8 to Latin-1 */
3614 #endif /* CK_ANSIC */
3615 { /* xl1r8 */ /* Latin-1 to Hewlett Packard Roman8 */
3619 /* Translation functions for receiving files and translating them into ASCII */
3626 #endif /* CK_ANSIC */
3628 switch(langs[language].id) {
3631 if (c == 255) { /* Dutch umlaut-y */
3632 zdstuff('j'); /* becomes ij */
3634 } else return(yl1as[c]); /* all others by the book */
3637 switch (c) { /* German, special rules. */
3638 case 196: /* umlaut-A -> Ae */
3641 case 214: /* umlaut-O -> Oe */
3644 case 220: /* umlaut-U -> Ue */
3647 case 228: /* umlaut-a -> ae */
3650 case 246: /* umlaut-o -> oe */
3653 case 252: /* umlaut-u -> ue */
3656 case 223: /* ess-zet -> ss */
3659 default: return(yl1as[c]); /* all others by the book */
3665 switch (c) { /* Scandanavian languages. */
3666 case 196: /* umlaut-A -> Ae */
3669 case 214: /* umlaut-O -> Oe */
3670 case 216: /* O-slash -> Oe */
3673 case 220: /* umlaut-U -> Y */
3677 case 228: /* umlaut-a -> ae */
3680 case 246: /* umlaut-o -> oe */
3681 case 248: /* o-slash -> oe */
3684 case 252: /* umlaut-u -> y */
3688 case 197: /* A-ring -> Aa */
3691 case 229: /* a-ring -> aa */
3694 default: return(yl1as[c]); /* All others by the book */
3697 return(yl1as[c]); /* No language, go by the table. */
3701 CHAR /* IBM CP437 to Latin-1 */
3706 #endif /* CK_ANSIC */
3711 CHAR /* IBM CP850 to Latin-1 */
3716 #endif /* CK_ANSIC */
3721 CHAR /* Latin-1 to IBM CP437 */
3726 #endif /* CK_ANSIC */
3731 CHAR /* Latin-1 to CP850 */
3736 #endif /* CK_ANSIC */
3746 #endif /* CK_ANSIC */
3747 { /* x43as */ /* CP437 to ASCII */
3748 c = y43l1[c]; /* Translate to Latin-1 */
3749 return(xl143(c)); /* and from Latin-1 to ASCII. */
3757 #endif /* CK_ANSIC */
3758 { /* x85as */ /* CP850 to ASCII */
3759 c = y85l1[c]; /* Translate to Latin-1 */
3760 return(xl1as(c)); /* and from Latin-1 to ASCII. */
3763 CHAR /* Macintosh Latin to Latin-1 */
3768 #endif /* CK_ANSIC */
3770 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3771 if (c == 206) { /* handle OE digraph. */
3774 } else if (c == 207) { /* Also lowercase oe. */
3782 CHAR /* Macintosh Latin to ASCII */
3787 #endif /* CK_ANSIC */
3789 if (langs[language].id == L_FRENCH) { /* If SET LANGUAGE FRENCH */
3790 if (c == 206) { /* handle OE digraph. */
3793 } else if (c == 207) { /* Also lowercase oe. */
3798 c = yaql1[c]; /* Translate to Latin-1 */
3799 return(xl1as(c)); /* then to ASCII. */
3802 CHAR /* Latin-1 to Macintosh Latin */
3807 #endif /* CK_ANSIC */
3814 /* Translation functions for Latin Alphabet 2 */
3816 CHAR /* Latin-2 to Latin-1 */
3821 #endif /* CK_ANSIC */
3831 #endif /* CK_ANSIC */
3832 { /* xl2w1 */ /* Latin-2 to CP1252 (Windows L1) */
3833 if (c > 127 && c < 160)
3839 CHAR /* Latin-1 to Latin-2 */
3844 #endif /* CK_ANSIC */
3849 CHAR /* CP1252 to Latin-1 */
3854 #endif /* CK_ANSIC */
3857 case 0x8a: return(0xa9); /* S caron */
3858 case 0x8e: return(0xae); /* Z caron */
3859 case 0x9a: return(0xb9); /* s caron */
3860 case 0x9e: return(0xbe); /* z caron */
3862 return((c < 160) ? xw1as(c) : xl1l2(c));
3867 CHAR /* Latin-2 to ASCII */
3872 #endif /* CK_ANSIC */
3877 CHAR /* Latin-2 to CP852 */
3882 #endif /* CK_ANSIC */
3887 CHAR /* Latin-2 to Mazovia */
3892 #endif /* CK_ANSIC */
3897 CHAR /* Latin-1 to Mazovia */
3902 #endif /* CK_ANSIC */
3904 return(yl2mz[yl1l2[c]]);
3907 CHAR /* Mazovia to Latin-1 */
3912 #endif /* CK_ANSIC */
3914 return(yl2l1[ymzl2[c]]);
3917 CHAR /* Mazovia to Latin-9 */
3922 #endif /* CK_ANSIC */
3924 return(xl2l9(ymzl2[c]));
3927 CHAR /* CP852 to Latin-2 */
3932 #endif /* CK_ANSIC */
3937 CHAR /* Mazovia to Latin-2 */
3942 #endif /* CK_ANSIC */
3947 CHAR /* Latin-2 to CP1250 */
3952 #endif /* CK_ANSIC */
3957 CHAR /* CP1250 to Latin-2 */
3962 #endif /* CK_ANSIC */
3967 CHAR /* CP852 to ASCII */
3972 #endif /* CK_ANSIC */
3974 return(yl2as[y52l2[c]]); /* CP852 -> Latin-2 -> ASCII */
3977 CHAR /* CP1250 to ASCII */
3982 #endif /* CK_ANSIC */
3984 return(yl2as[y1250l2[c]]); /* CP81250 -> Latin-2 -> ASCII */
3988 CHAR /* CP852 to Latin-1 */
3993 #endif /* CK_ANSIC */
3995 return(yl2l1[y52l2[c]]); /* CP852 -> Latin-2 -> Latin-1 */
3998 CHAR /* CP1250 to Latin-1 */
4003 #endif /* CK_ANSIC */
4005 return(yl2l1[y1250l2[c]]); /* CP1250 -> Latin-2 -> Latin-1 */
4008 CHAR /* CP1250 to Latin-9 */
4013 #endif /* CK_ANSIC */
4015 if (c == (CHAR)128) /* Euro */
4018 return(xl2l9(y1250l2[c])); /* CP1250 -> Latin-2 -> Latin-9 */
4021 CHAR /* Latin-1 to CP852 */
4026 #endif /* CK_ANSIC */
4028 return(yl252[yl1l2[c]]); /* Latin-1 -> Latin-2 -> CP852 */
4031 CHAR /* Latin-1 to CP1250 */
4036 #endif /* CK_ANSIC */
4038 return(yl21250[yl1l2[c]]); /* Latin-1 -> Latin-2 -> CP1250 */
4041 CHAR /* Latin-9 to CP1250 */
4046 #endif /* CK_ANSIC */
4048 if (c == (CHAR)164) /* Euro */
4051 return(yl21250[xl9l2(c)]); /* Latin-9 -> Latin-2 -> CP1250 */
4054 CHAR /* Latin-9 to Mazovia */
4059 #endif /* CK_ANSIC */
4061 return(yl2mz[xl9l2(c)]); /* Latin-9 -> Latin-2 -> Mazovia */
4064 CHAR /* Latin-9 to Mazovia */
4069 #endif /* CK_ANSIC */
4071 return(yl2as[xmzl2(c)]); /* Mazovia -> Latin-2 -> ASCII */
4074 CHAR /* Latin-2 to NeXT */
4079 #endif /* CK_ANSIC */
4082 case 162: return(198); /* Breve */
4083 case 163: return(232); /* L with stroke */
4084 case 178: return(206); /* Ogonek */
4085 case 179: return(248); /* l with stroke */
4086 case 183: return(207); /* Caron */
4087 case 189: return(205); /* Double acute */
4088 case 208: return(144); /* D stroke = Eth */
4089 case 240: return(230); /* d stroke = eth */
4090 case 255: return(199); /* Dot above */
4091 default: return(yl1ne[yl2l1[c]]);
4095 CHAR /* Latin-2 to CP437 */
4100 #endif /* CK_ANSIC */
4102 return(yl1l2[y43l1[c]]);
4105 CHAR /* Latin-2 to CP850 */
4110 #endif /* CK_ANSIC */
4112 return(yl1l2[y85l1[c]]);
4115 CHAR /* Latin-2 to Apple */
4120 #endif /* CK_ANSIC */
4122 return(yl1aq[yl2l1[c]]); /* Could do more... */
4125 CHAR /* Latin-2 to DGI */
4130 #endif /* CK_ANSIC */
4132 return(ydgl1[yl1l2[c]]);
4135 CHAR /* Latin-2 to Short KOI */
4140 #endif /* CK_ANSIC */
4142 return(islower(c) ? toupper(c) : c);
4145 CHAR /* NeXT to Latin-2 */
4150 #endif /* CK_ANSIC */
4153 case 144: return(208); /* D stroke = Eth */
4154 case 198: return(162); /* Breve */
4155 case 199: return(255); /* Dot above */
4156 case 205: return(189); /* Double acute */
4157 case 206: return(178); /* Ogonek */
4158 case 207: return(183); /* Caron */
4159 case 230: return(240); /* d stroke = eth */
4160 case 232: return(163); /* L with stroke */
4161 case 248: return(179); /* l with stroke */
4162 default: return(yl1l2[ynel1[c]]); /* Others, go thru Latin-1 */
4166 CHAR /* CP437 to Latin-2 */
4171 #endif /* CK_ANSIC */
4173 return(yl1l2[y43l1[c]]);
4176 CHAR /* CP850 to Latin-2 */
4181 #endif /* CK_ANSIC */
4183 return(yl1l2[y85l1[c]]);
4186 CHAR /* Apple to Latin-2 */
4191 #endif /* CK_ANSIC */
4194 case 249: return(162); /* Breve accent */
4195 case 250: return(255); /* Dot accent */
4196 case 253: return(189); /* Double acute */
4197 default: return(yl1l2[yaql1[c]]);
4201 CHAR /* DGI to Latin-2 */
4206 #endif /* CK_ANSIC */
4208 return(yl1l2[ydgl1[c]]); /* (for now) */
4211 CHAR /* Short KOI to Latin-2 */
4216 #endif /* CK_ANSIC */
4218 return(islower(c) ? toupper(c) : c);
4221 CHAR /* Latin-2 to German */
4226 #endif /* CK_ANSIC */
4229 case 167: return(64); /* Paragraph sign */
4230 case 196: return(91); /* A-diaeresis */
4231 case 214: return(92); /* O-diaeresis */
4232 case 220: return(93); /* U-diaeresis */
4233 case 223: return(126); /* double-s */
4234 case 228: return(123); /* a-diaeresis */
4235 case 246: return(124); /* o-diaeresis */
4236 case 252: return(125); /* u-diaeresis */
4237 default: return(yl2as[c]); /* Others */
4241 CHAR /* German to Latin-2 */
4246 #endif /* CK_ANSIC */
4251 case 64: return(167); /* Paragraph sign */
4252 case 91: return(196); /* A-diaeresis */
4253 case 92: return(214); /* O-diaeresis */
4254 case 93: return(220); /* U-diaeresis */
4255 case 123: return(228); /* a-diaeresis */
4256 case 126: return(223); /* double-s */
4257 case 124: return(246); /* o-diaeresis */
4258 case 125: return(252); /* u-diaeresis */
4259 default: return(c); /* Others */
4263 CHAR /* Latin-2 to Hungarian */
4268 #endif /* CK_ANSIC */
4271 case 164: return(36); /* Currency symbol */
4272 case 189: return(126); /* Double acute accent */
4273 case 193: return(64); /* A-acute */
4274 case 201: return(91); /* E-acute */
4275 case 214: return(92); /* O-diaeresis */
4276 case 220: return(93); /* U-diaeresis */
4277 case 225: return(96); /* a-acute */
4278 case 233: return(123); /* e-acute */
4279 case 246: return(124); /* o-diaeresis */
4280 case 252: return(125); /* u-diaeresis */
4281 default: return(yl2as[c]); /* Others */
4285 CHAR /* Hungarian to Latin-2 */
4290 #endif /* CK_ANSIC */
4295 case 36: return(164); /* Currency symbol */
4296 case 64: return(193); /* A-acute */
4297 case 91: return(201); /* E-acute */
4298 case 92: return(214); /* O-diaeresis */
4299 case 93: return(220); /* U-diaeresis */
4300 case 96: return(225); /* a-acute */
4301 case 123: return(233); /* e-acute */
4302 case 124: return(246); /* o-diaeresis */
4303 case 125: return(252); /* u-diaeresis */
4304 case 126: return(189); /* Double acute accent */
4305 default: return(c); /* Others */
4314 #endif /* CK_ANSIC */
4315 { /* xr8l2 */ /* Hewlett Packard Roman8 to Latin-2 */
4317 case 235: return(169); /* S caron */
4318 case 236: return(185); /* s caron */
4319 default: return(yl1l2[yr8l1[c]]);
4328 #endif /* CK_ANSIC */
4329 { /* xl2r8 */ /* Latin-2 to Hewlett Packard Roman8 Character Set */
4331 case 169: return(235); /* S caron */
4332 case 185: return(236); /* s caron */
4333 default: return(yr8l1[yl1l2[c]]);
4337 #else /* NOLATIN2 */
4347 #define xl11250 NULL
4348 #define xl21250 NULL
4349 #define xl91250 NULL
4351 #define x1250as NULL
4352 #define x1250l1 NULL
4353 #define x1250l2 NULL
4354 #define x1250l9 NULL
4386 /* This one can also be used for ELOT 927, Hebrew 7, etc */
4393 #endif /* CK_ANSIC */
4394 { /* xassk */ /* ASCII to Short KOI */
4397 return((c > 95) ? (c - 32) : c); /* Fold columns 6-7 to 4-5 */
4401 /* Translation functions for Cyrillic character sets */
4403 CHAR /* Latin/Cyrillic to CP866 */
4408 #endif /* CK_ANSIC */
4409 { /* xlcac */ /* PC Code Page 866 */
4413 CHAR /* Latin/Cyrillic to */
4418 #endif /* CK_ANSIC */
4419 { /* xlc55 */ /* PC Code Page 855 */
4423 CHAR /* Latin/Cyrillic to */
4428 #endif /* CK_ANSIC */
4429 { /* xlc1251 */ /* PC Code Page 1251 */
4433 CHAR /* Latin/Cyrillic to... */
4438 #endif /* CK_ANSIC */
4439 { /* xlcbu */ /* Bulgarian PC Code Page */
4443 CHAR /* Latin/Cyrillic to Old KOI-8 */
4448 #endif /* CK_ANSIC */
4453 CHAR /* Latin/Cyrillic to KOI8-R */
4458 #endif /* CK_ANSIC */
4461 case 0xa1: return(0xb3); /* Io */
4462 case 0xf1: return(0xa3); /* io */
4464 if (c > 0x7f && c < 0xc0)
4470 CHAR /* Latin/Cyrillic to KOI8-U */
4475 #endif /* CK_ANSIC */
4478 case 0xa1: return(0xb3); /* Io */
4479 case 0xf1: return(0xa3); /* io */
4480 case 0xf4: return(0xa4); /* Ukrainian ie */
4481 case 0xf6: return(0xa6); /* Ukrainian i */
4482 case 0xf7: return(0xa7); /* Ukrainian yi */
4483 case 0xf3: return(0xad); /* Ukrainian ghe with upturn */
4484 case 0xa4: return(0xb4); /* Ukrainian Ie */
4485 case 0xa6: return(0xb6); /* Ukrainian I */
4486 case 0xa7: return(0xb7); /* Ukrainian Yi */
4487 case 0xa3: return(0xbd); /* Ukrainian Ghe with upturn */
4489 if (c > 0x7f && c < 0xc0)
4500 #endif /* CK_ANSIC */
4501 { /* xlcsk */ /* Latin/Cyrillic to Short KOI */
4510 #endif /* CK_ANSIC */
4511 { /* xlcas */ /* Latin/Cyrillic to ASCII */
4512 if (langs[language].id == L_RUSSIAN)
4515 return((c > 127) ? '?' : c);
4523 #endif /* CK_ANSIC */
4524 { /* xaclc */ /* to Latin/Cyrillic */
4533 #endif /* CK_ANSIC */
4534 { /* x55lc */ /* to Latin/Cyrillic */
4538 CHAR /* Bulgarian PC Code Page ... */
4543 #endif /* CK_ANSIC */
4544 { /* xbulc */ /* to Latin/Cyrillic */
4553 #endif /* CK_ANSIC */
4554 { /* x1251lc */ /* to Latin/Cyrillic */
4558 CHAR /* Old KOI-8 to Latin/Cyrillic */
4563 #endif /* CK_ANSIC */
4568 CHAR /* KOI8-R to Latin/Cyrillic */
4573 #endif /* CK_ANSIC */
4575 if (c == 0xb3) return(0xa1);
4576 else if (c == 0xa3) return(0xf1);
4577 else if (c > 0x7f && c < 0xc0)
4582 CHAR /* KOI8-U to Latin/Cyrillic */
4587 #endif /* CK_ANSIC */
4590 case 0xb3: return(0xa1); /* Io */
4591 case 0xa3: return(0xf1); /* io */
4592 case 0xa4: return(0xf4); /* Ukrainian ie */
4593 case 0xa6: return(0xf6); /* Ukrainian i */
4594 case 0xa7: return(0xf7); /* Ukrainian yi */
4595 case 0xad: return(0xf3); /* Ukrainian ghe with upturn */
4596 case 0xb4: return(0xa4); /* Ukrainian Ie */
4597 case 0xb6: return(0xa6); /* Ukrainian I */
4598 case 0xb7: return(0xa7); /* Ukrainian Yi */
4599 case 0xbd: return(0xa3); /* Ukrainian Ghe with upturn */
4600 /* Note substitution of Gje for Ghe-Upturn, which is not in 8859-5 */
4602 if (c > 0x7f && c < 0xc0)
4613 #endif /* CK_ANSIC */
4614 { /* xskcy */ /* Short KOI to Latin/Cyrillic */
4615 return(yskcy[c & 0x7f]);
4623 #endif /* CK_ANSIC */
4624 { /* xascy */ /* ASCII to Latin/Cyrillic */
4625 if (langs[language].id == L_RUSSIAN) { /* If LANGUAGE == RUSSIAN */
4626 return(yskcy[c & 0x7f]); /* treat ASCII as Short KOI */
4627 } else return((c > 127) ? '?' : c);
4635 #endif /* CK_ANSIC */
4636 { /* xacas */ /* CP866 to ASCII */
4637 if (langs[language].id == L_RUSSIAN) {
4638 c = yaclc[c]; /* First to Latin/Cyrillic */
4639 return(ylcsk[c]); /* Then to Short KOI */
4640 } else return((c > 127) ? '?' : c);
4648 #endif /* CK_ANSIC */
4649 { /* x55as */ /* CP855 to ASCII */
4650 if (langs[language].id == L_RUSSIAN) {
4651 c = y55lc[c]; /* First to Latin/Cyrillic */
4652 return(ylcsk[c]); /* Then to Short KOI */
4653 } else return((c > 127) ? '?' : c);
4661 #endif /* CK_ANSIC */
4662 { /* x1251as */ /* CP81251 to ASCII */
4663 if (langs[language].id == L_RUSSIAN) {
4664 c = y1251lc[c]; /* First to Latin/Cyrillic */
4665 return(ylcsk[c]); /* Then to Short KOI */
4666 } else return((c > 127) ? '?' : c);
4674 #endif /* CK_ANSIC */
4675 { /* xskas */ /* Short KOI to ASCII */
4676 return((c > 95) ? '?' : c);
4684 #endif /* CK_ANSIC */
4685 { /* xk8as */ /* Old KOI-8 Cyrillic to ASCII */
4686 if (langs[language].id == L_RUSSIAN) {
4687 c = yk8lc[c]; /* First to Latin/Cyrillic */
4688 return(ylcsk[c]); /* Then to Short KOI */
4689 } else return((c > 127) ? '?' : c);
4697 #endif /* CK_ANSIC */
4698 { /* xl1sk */ /* Latin-1 to Short KOI */
4699 c = zl1as(c); /* Convert to ASCII */
4700 return(c = xassk(c)); /* Convert ASCII to Short KOI */
4708 #endif /* CK_ANSIC */
4709 { /* xw1lc */ /* CP1252 to Latin/Cyrillic */
4710 return((c < 160) ? xw1as(c) : zl1as(c));
4718 #endif /* CK_ANSIC */
4719 { /* xaslc */ /* ASCII to Latin/Cyrillic */
4720 if (langs[language].id == L_RUSSIAN)
4721 return(yskcy[c & 0x7f]);
4722 else return(c & 0x7f);
4730 #endif /* CK_ANSIC */
4731 { /* xasac */ /* ASCII to CP866 */
4734 if (langs[language].id == L_RUSSIAN) { /* Use Short KOI */
4735 c = xskcy(c); /* Translate to Latin/Cyrillic */
4736 return(ylcac[c]); /* Then to CP866 */
4737 } else return(c & 0x7f);
4745 #endif /* CK_ANSIC */
4746 { /* xas55 */ /* ASCII to CP855 */
4749 if (langs[language].id == L_RUSSIAN) { /* Use Short KOI */
4750 c = xskcy(c); /* Translate to Latin/Cyrillic */
4751 return(ylc55[c]); /* Then to CP866 */
4752 } else return(c & 0x7f);
4760 #endif /* CK_ANSIC */
4761 { /* xas1251 */ /* ASCII to CP81251 */
4764 if (langs[language].id == L_RUSSIAN) { /* Use Short KOI */
4765 c = xskcy(c); /* Translate to Latin/Cyrillic */
4766 return(ylc1251[c]); /* Then to CP866 */
4767 } else return(c & 0x7f);
4775 #endif /* CK_ANSIC */
4776 { /* xask8 */ /* ASCII to KOI-8 */
4779 if (langs[language].id == L_RUSSIAN) { /* Use Short KOI */
4780 c = xskcy(c); /* Translate to Latin/Cyrillic */
4781 return(ylck8[c]); /* Then to KOI-8 */
4782 } else return(c & 0x7f);
4784 #else /* No Cyrillic */
4787 #define x1251as NULL
4790 #define x1251lc NULL
4793 #define xas1251 NULL
4806 #define xlc1251 NULL
4817 #endif /* CYRILLIC */
4819 /* Translation functions for Hebrew character sets */
4828 #endif /* CK_ANSIC */
4829 { /* xash7 */ /* ASCII to Hebrew-7 */
4832 if (c == 96) return('?');
4833 if (c > 96 && c < 123) return(c - 32);
4842 #endif /* CK_ANSIC */
4843 { /* xl1h7 */ /* Latin-1 to Hebrew-7 */
4844 return(xash7(xl1as(c)));
4852 #endif /* CK_ANSIC */
4853 { /* xl1lh */ /* Latin-1 to Latin/Hebrew */
4855 case 170: return('a'); /* Feminine ordinal */
4856 case 186: return('o'); /* Masculine ordinal */
4857 case 215: return(170); /* Times */
4858 case 247: return(186); /* Divide */
4859 default: return( (c > 190) ? xl1as(c) : c );
4868 #endif /* CK_ANSIC */
4869 { /* xw1lh */ /* CP1252 to Latin/Hebrew */
4871 case 170: return('a'); /* Feminine ordinal */
4872 case 186: return('o'); /* Masculine ordinal */
4873 case 215: return(170); /* Times */
4874 case 247: return(186); /* Divide */
4879 return((c > 190) ? xl1as(c) : c);
4889 #endif /* CK_ANSIC */
4890 { /* xl2h7 */ /* Latin-2 to Hebrew-7 */
4891 return(xash7(xl2as(c)));
4903 #endif /* CK_ANSIC */
4904 { /* xlch7 */ /* Latin/Cyrillic to Hebrew-7 */
4905 return(xash7(xlcas(c)));
4907 #endif /* NOCYRIL */
4914 #endif /* CK_ANSIC */
4915 { /* xlhas */ /* Latin/Hebrew to ASCII */
4916 return( (c > 127) ? '?' : c );
4924 #endif /* CK_ANSIC */
4925 { /* xlhl1 */ /* Latin/Hebrew to Latin-1 */
4927 case 170: return(215);
4928 case 186: return(247);
4929 default: return( (c > 190) ? '?' : c );
4938 #endif /* CK_ANSIC */
4939 { /* xlhw1 */ /* Latin/Hebrew to CP1252 */
4940 if (c > 127 && c < 160)
4943 case 170: return(215);
4944 case 186: return(247);
4945 default: return( (c > 190) ? '?' : c );
4954 #endif /* CK_ANSIC */
4955 { /* xlh62 */ /* Latin/Hebrew to CP862 */
4964 #endif /* CK_ANSIC */
4965 { /* xl162 */ /* Latin-1 to CP862 */
4966 return(xlh62(xl1lh(c))); /* Via Latin/Hebrew */
4974 #endif /* CK_ANSIC */
4975 { /* xlhh7 */ /* Latin/Hebrew to Hebrew-7 */
4984 #endif /* CK_ANSIC */
4985 { /* xh7as */ /* Hebrew-7 to ASCII */
4988 return( (c > 95 && c < 123) ? '?' : c );
4996 #endif /* CK_ANSIC */
4997 { /* x62lh */ /* CP862 to Latin/Hebrew */
5006 #endif /* CK_ANSIC */
5007 { /* x62as */ /* CP862 to ASCII */
5008 return( xlhas(x62lh(c)) );
5016 #endif /* CK_ANSIC */
5017 { /* x62l1 */ /* CP862 to Latin-1 */
5018 return( xlhl1(x62lh(c)) );
5026 #endif /* CK_ANSIC */
5027 { /* xh7lh */ /* Hebrew-7 to Latin/Hebrew */
5033 #else /* No Hebrew */
5055 /* Translation functions for Greek character sets */
5064 #endif /* CK_ANSIC */
5065 { /* xaseg */ /* ASCII to ELOT 927 */
5068 if (c > 96 && c < 123) return(c - 32);
5077 #endif /* CK_ANSIC */
5078 { /* xl1ge */ /* Latin-1 to ELOT 927 */
5079 return(xaseg(xl1as(c)));
5087 #endif /* CK_ANSIC */
5088 { /* xl2lg */ /* Latin-1 to Latin/Greek */
5089 if (c < 160) return(c);
5090 else if (c == 160 || c == 168 || c == 173 || c == 174)
5100 #endif /* CK_ANSIC */
5101 { /* xl1lg */ /* Latin-1 to Latin/Greek */
5102 if (c < 160) return(c);
5104 case 160: /* Themselves */
5121 case 181: /* Lowercase mu */
5133 #endif /* CK_ANSIC */
5134 { /* xw1lg */ /* CP1252 to Latin/Greek */
5135 return((c < 160) ? xw1as(c) : xl1lg(c));
5145 #endif /* CK_ANSIC */
5146 { /* xl2eg */ /* Latin-2 to ELOT 927 */
5147 return(xaseg(xl2as(c)));
5159 #endif /* CK_ANSIC */
5160 { /* xlceg */ /* Latin/Cyrillic to ELOT 927 */
5161 return(xaseg(xlcas(c)));
5163 #endif /* NOCYRIL */
5170 #endif /* CK_ANSIC */
5171 { /* xlgas */ /* Latin/Greek to ASCII */
5172 return( (c > 127) ? '?' : c );
5180 #endif /* CK_ANSIC */
5181 { /* xlgl1 */ /* Latin/Greek to Latin-1 */
5193 #endif /* CK_ANSIC */
5194 { /* xlgw1 */ /* Latin/Greek to Latin-1 */
5195 if (c > 127 && c < 160)
5205 #endif /* CK_ANSIC */
5206 { /* xlg69 */ /* Latin/Greek to CP869 */
5215 #endif /* CK_ANSIC */
5216 { /* xl169 */ /* Latin-1 to CP869 */
5217 return(xlg69(xl1lg(c))); /* Via Latin/Greek */
5225 #endif /* CK_ANSIC */
5226 { /* xlgeg */ /* Latin/Greek to ELOT 927 */
5235 #endif /* CK_ANSIC */
5236 { /* xegas */ /* ELOT 927 to ASCII */
5239 return( (c > 96 && c < 123) ? '?' : c );
5247 #endif /* CK_ANSIC */
5248 { /* x69lg */ /* CP869 to Latin/Greek */
5257 #endif /* CK_ANSIC */
5258 { /* x69as */ /* CP869 to ASCII */
5259 return( xlgas(x69lg(c)) );
5267 #endif /* CK_ANSIC */
5268 { /* x69l1 */ /* CP869 to Latin-1 */
5269 return( xlgl1(x69lg(c)) );
5277 #endif /* CK_ANSIC */
5278 { /* xeglg */ /* ELOT 927 to Latin/Greek */
5282 #else /* No Greek */
5307 /* Translation functions for Japanese Kanji character sets */
5311 Translate Kanji Transfer Character Set (EUC) to local file character set,
5312 contributed by Dr. Hirofumi Fujii, Japan High Energy Research Laboratory
5313 (KEK), Tokyo, Japan.
5315 a is a byte to be translated, which may be a single-byte character,
5316 the Katakana prefix, the first byte of a two-byte Kanji character, or the
5317 second byte of 2-byte Kanji character.
5319 fn is the output function.
5321 Returns 0 on success, -1 on failure.
5324 _PROTOTYP(static int jpnxas, (int, int[]) );
5325 _PROTOTYP(static int jpnxkt, (int, int[]) );
5326 _PROTOTYP(static int jpnxkn, (int[], int[]) );
5328 static int jpncnt; /* Byte count for Japanese */
5329 static int jpnlst; /* Last status (for JIS7) */
5332 jpnxas(a, obuf) int a; int obuf[]; { /* Translate ASCII to local file code */
5336 if (fcharset == FC_JIS7) {
5363 jpnxkt(a, obuf) int a; int obuf[]; {
5364 /* Translate JIS X 201 Katakana to local code */
5369 if (fcharset == FC_JIS7) {
5371 case 2: /* from Kanji */
5375 case 0: /* from Roman */
5378 obuf[r++] = (a & 0x7f);
5382 if (fcharset == FC_JEUC)
5384 obuf[r++] = (a | 0x80);
5390 jpnxkn(ibuf, obuf) int ibuf[], obuf[]; {
5391 /* Translate JIS X 0208 Kanji to local code */
5395 c1 = ibuf[0] & 0x7f;
5396 c2 = ibuf[1] & 0x7f;
5398 if (fcharset == FC_SHJIS) {
5404 if (c2 >= 0x7f) c2++;
5406 c1 = ((c1 - 0x21) >> 1) + 0x81;
5407 if (c1 > 0x9f) c1 += 0x40;
5412 } else if (fcharset == FC_JIS7) {
5416 obuf[r++] = 0x0f; /* From Katakana */
5427 obuf[0] = (c1 | 0x80);
5428 obuf[1] = (c2 | 0x80);
5436 /* Initialize parameters for xkanji */
5437 /* This function should be called when F/X-packet is received */
5438 jpncnt = jpnlst = 0;
5444 xkanjz(int (*fn)(char))
5446 xkanjz(fn) int (*fn)();
5447 #endif /* CK_ANSIC */
5451 This function must be called when Z-packet is received
5452 (before closing the file).
5457 if (fcharset == FC_JIS7) {
5458 c = 'A'; /* Dummy Roman character */
5459 r = jpnxas(c, obuf) - 1; /* -1 removes Dummy character */
5461 for (i = 0; i < r; i++)
5462 if (((*fn)((char) obuf[i])) < 0)
5471 xkanji(int a, int (*fn)(char))
5473 xkanji(a, fn) int a; int (*fn)();
5474 #endif /* CK_ANSIC */
5486 if ((a & 0x80) == 0) {
5487 /* 8th bit is 0, i.e., single-byte code */
5488 r = jpnxas(a, obuf);
5491 /* 8th bit is 1, check the range */
5493 if (((c7 > 0x20) && (c7 < 0x7f)) || (c7 == 0x0e)) {
5494 /* double byte code */
5497 /* single byte code */
5498 r = jpnxas(a, obuf);
5503 /* not the 1st byte */
5505 if (xbuf[0] == 0x8e) {
5506 r = jpnxkt(xbuf[1], obuf);
5509 r = jpnxkn(xbuf, obuf);
5514 for (i = 0; i < r; i++ )
5515 if (((*fn)((char) obuf[i])) < 0)
5524 Function for translating from Japanese file character set
5525 to Japanese EUC transfer character set.
5526 Returns a pointer to a string containing 0, 1, or 2 bytes.
5530 static int jpnstz; /* status for JIS-7 */
5531 static int jpnpnd; /* number of pending bytes */
5532 static int jpnpnt; /* pending buffer index */
5533 static int jpnpbf[8]; /* pending buffer */
5535 /* There is some duplication here between the old and new JIS-7 parsers */
5536 /* to be cleaned up later... */
5539 j7init() { /* Initialize JIS-7 parser */
5546 getj7() { /* Reads JIS-7 returns next EUC byte */
5549 if (jpnpnd > 0) { /* If something is pending */
5550 x = (unsigned) jpnpbf[jpnpnt++]; /* Get it */
5552 if (jpnpnd < 0) jpnpnd = 0;
5553 return((unsigned)x);
5557 if ((x = zminchar()) < 0) return(x);
5558 while (jpnpnd == 0) { /* While something is pending... */
5559 if ((x > 0x20) && (x < 0x7f)) { /* 7-bit graphic character */
5561 case 1: /* Katakana */
5563 /* This can't be right... */
5564 jpnpbf[jpnpnd++] = 0x80; /* Insert flag (NOT SS2???) */
5566 jpnpbf[jpnpnd++] = 0x8e; /* Insert SS2 */
5567 #endif /* COMMENT */
5568 jpnpbf[jpnpnd++] = (x | 0x80); /* Insert Kana + 8th bit */
5571 jpnpbf[jpnpnd++] = (x | 0x80); /* Get another byte */
5572 if ((x = zminchar()) < 0) return(x);
5573 jpnpbf[jpnpnd++] = (x | 0x80);
5575 default: /* ASCII / JIS Roman */
5576 jpnpbf[jpnpnd++] = x;
5579 } else if (x == 0x0e) { /* ^N = SO */
5580 jpnstz = 1; /* Katakana */
5581 if ((x = zminchar()) < 0) return(x);
5582 } else if (x == 0x0f) { /* ^O = SI */
5583 jpnstz = 0; /* ASCII / JIS Roman */
5584 if ((x = zminchar()) < 0) return(x);
5585 } else if (x == 0x1b) { /* Escape */
5586 jpnpbf[jpnpnd++] = x; /* Save in buffer */
5587 if ((x = zminchar()) < 0) return(x);
5588 jpnpbf[jpnpnd++] = x; /* Save in buffer */
5589 if (x == '$') { /* <ESC>$ */
5590 if ((x = zminchar()) < 0) return(x);
5591 jpnpbf[jpnpnd++] = x;
5592 if ((x == '@') || (x == 'B')) { /* Kanji */
5594 jpnpnt = jpnpnd = 0;
5595 if ((x = zminchar()) < 0) return(x);
5597 } else if (x == '(') { /* <ESC>( == 94-byte single-byte set */
5598 if ((x = zminchar()) < 0) return(x);
5599 jpnpbf[jpnpnd++] = x;
5600 if ((x == 'B') || (x == 'J')) { /* ASCII or JIS Roman */
5601 jpnstz = 0; /* Set state */
5602 jpnpnt = jpnpnd = 0; /* Reset pointers */
5603 if ((x = zminchar()) < 0) return(x);
5605 } else if (x == 0x1b) { /* <ESC><ESC> */
5606 jpnpnt = jpnpnd = 0; /* Reset pointers, stay in state */
5607 if ((x = zminchar()) < 0) return(x);
5609 } else { /* Not <ESC> - just save it */
5610 jpnpbf[jpnpnd++] = x;
5614 x = (unsigned)jpnpbf[jpnpnt++];
5616 return((unsigned)x);
5621 eu_to_sj(USHORT eu) /* EUC-JP to Shift-JIS */
5623 eu_to_sj(eu) USHORT eu;
5624 #endif /* CK_ANSIC */
5627 union ck_short jcode,scode;
5630 c1 = (jcode.x_char[byteorder] & 0x7f);
5631 c2 = (jcode.x_char[1-byteorder] & 0x7f);
5639 c1 = ((c1 - 0x21) >> 1) + 0x81;
5643 scode.x_char[byteorder] = c1;
5644 scode.x_char[1-byteorder] = c2;
5645 return(scode.x_short);
5651 sj_to_eu(USHORT sj) /* Shift-JIS to EUC-JP */
5653 sj_to_eu(sj) USHORT sj;
5654 #endif /* CK_ANSIC */
5656 union ck_short jcode, scode;
5660 c0 = scode.x_char[byteorder]; /* Left (hi order) byte */
5661 c1 = scode.x_char[1-byteorder]; /* Right (lo order) byte */
5663 if (((c0 >= 0x81) && (c0 <= 0x9f)) || /* High order byte has 8th bit set */
5664 ((c0 >= 0xe0) && (c0 <= 0xfc))) { /* Kanji */
5665 if (c0 <= 0x9f) /* Two bytes in */
5666 c0 -= 0x71; /* Do the shifting... */
5670 if (c1 > 0x7f) c1 -= 1;
5677 jcode.x_char[byteorder] = (c0 | 0x80); /* Two bytes out */
5678 jcode.x_char[1-byteorder] = (c1 | 0x80);
5680 } else if (c0 == 0) { /* Single byte */
5681 if (c1 >= 0xa1 && c1 <= 0xdf) { /* Katakana */
5682 jcode.x_char[byteorder] = 0x8e; /* SS2 */
5683 jcode.x_char[1-byteorder] = c1; /* Kana code */
5684 } else { /* ASCII or C0 */
5687 } else { /* Something bad */
5688 debug(F001,"sj_to_eu bad sj","",sj);
5689 jcode.x_short = 0xffff;
5691 return(jcode.x_short);
5695 zkanjf() { /* Initialize */
5696 jpnstz = jpnpnd = jpnpnt = 0;
5707 zkanji(int (*fn)(void))
5709 zkanji(fn) int (*fn)();
5710 #endif /* CK_ANSIC */
5712 /* Read Japanese local code and translate to Japanese EUC */
5716 /* No pending characters */
5717 if (fcharset == FC_SHJIS) { /* Translating from Shift-JIS */
5720 return(jpnpbf[jpnpnt++]);
5723 jpnpnd = jpnpnt = 0;
5724 if (((a >= 0x81) && (a <= 0x9f)) ||
5725 ((a >= 0xe0) && (a <= 0xfc))) { /* 2-byte Kanji code */
5727 if ((sc[1] = (*fn)()) < 0) /* Get second byte */
5733 sc[0] = sc[0] * 2 + 1;
5736 if (sc[1] >= 0x9e) {
5743 jpnpbf[0] = (sc[1] | 0x80);
5746 } else if ((a >= 0xa1) && (a <= 0xdf)) { /* Katakana */
5753 } else if (fcharset == FC_JIS7 ) { /* 7-bit JIS X 0208 */
5755 a = jpnpbf[jpnpnt++];
5760 if ((a = (*fn)()) < 0)
5762 while (jpnpnd == 0) {
5763 if ((a > 0x20) && (a < 0x7f)) {
5766 jpnpbf[jpnpnd++] = 0x80; /* Katakana */
5767 jpnpbf[jpnpnd++] = (a | 0x80);
5770 jpnpbf[jpnpnd++] = (a | 0x80); /* Kanji */
5771 if ((a = (*fn)()) < 0)
5773 jpnpbf[jpnpnd++] = (a | 0x80);
5776 jpnpbf[jpnpnd++] = a; /* Single byte */
5779 } else if (a == 0x0e) {
5781 if ((a = (*fn)()) < 0)
5783 } else if (a == 0x0f) {
5785 if ((a = (*fn)()) < 0)
5787 } else if (a == 0x1b) {
5788 jpnpbf[jpnpnd++] = a; /* Escape */
5789 if ((a = (*fn)()) < 0)
5791 jpnpbf[jpnpnd++] = a;
5793 if ((a = (*fn)()) < 0)
5795 jpnpbf[jpnpnd++] = a;
5796 if ((a == '@') || (a == 'B')) {
5798 jpnpnt = jpnpnd = 0;
5799 if ((a = (*fn)()) < 0)
5802 } else if (a == '(') {
5803 if ((a = (*fn)()) < 0)
5805 jpnpbf[jpnpnd++] = a;
5806 if ((a == 'B') || (a == 'J')) {
5808 jpnpnt = jpnpnd = 0;
5809 if ((a = (*fn)()) < 0)
5812 } else if (a == 0x1b) {
5813 jpnpnt = jpnpnd = 0;
5814 if ((a = (*fn)()) < 0)
5818 jpnpbf[jpnpnd++] = a;
5822 a = jpnpbf[jpnpnt++];
5832 /* Euro functions */
5840 #endif /* CK_ANSIC */
5841 { /* xl2l9 */ /* Latin-2 to Latin-9... */
5843 case 169: return((CHAR)166); /* S caron */
5844 case 185: return((CHAR)168); /* s caron */
5845 case 174: return((CHAR)180); /* Z caron */
5846 case 190: return((CHAR)184); /* z caron */
5853 _PROTOTYP( CHAR xl258, ( CHAR ) );
5859 #endif /* CK_ANSIC */
5860 { /* xl258 */ /* Latin-2 to CP858... */
5873 #endif /* CK_ANSIC */
5874 { /* zl9as */ /* Latin-9 to US ASCII... */
5875 if (c < (CHAR)0x80) return(c); /* Save a function call */
5877 case 0xa4: return(UNK); /* Euro */
5878 case 0xa6: return('S'); /* S Caron */
5879 case 0xa8: return('s'); /* s Caron */
5880 case 0xb4: return('Z'); /* Z Caron */
5881 case 0xbc: return('O'); /* OE digraph */
5882 case 0xbd: return('o'); /* oe digraph */
5883 case 0xbe: return('Y'); /* Y diaeresis */
5884 default: return(zl1as(c)); /* The rest is like Latin-1 */
5888 _PROTOTYP( CHAR xl9as, ( CHAR ) );
5894 #endif /* CK_ANSIC */
5895 { /* xl9as */ /* Latin-9 to US ASCII... */
5896 if (c < (CHAR)0x80) return(c); /* Save a function call */
5898 case 0xa4: return(UNK); /* Euro */
5899 case 0xa6: return('S'); /* S Caron */
5900 case 0xa8: return('s'); /* s Caron */
5901 case 0xb4: return('Z'); /* Z Caron */
5902 case 0xb8: return('z'); /* z Caron */
5903 case 0xbc: return('O'); /* OE digraph */
5904 case 0xbd: return('o'); /* oe digraph */
5905 case 0xbe: return('Y'); /* Y diaeresis */
5906 default: return(xl1as(c)); /* The rest is like Latin-1 */
5910 CHAR /* CP1252 to Latin-9 */
5915 #endif /* CK_ANSIC */
5918 case 0x80: return(0xa4); /* Euro sign */
5919 case 0x8a: return(0xa6); /* S caron */
5920 case 0x8c: return(0xbc); /* OE */
5921 case 0x8e: return(0xb4); /* Z caron */
5922 case 0x9a: return(0xa8); /* s caron */
5923 case 0x9c: return(0xbd); /* oe */
5924 case 0x9e: return(0xb8); /* z caron */
5925 case 0x9f: return(0xbe); /* Y diaeresis */
5926 case 0xa4: /* Currency sign */
5927 case 0xa6: /* Broken vertical bar */
5928 case 0xa8: /* Diaeresis */
5929 case 0xb4: /* Acute accent */
5930 case 0xb8: /* Cedilla */
5931 case 0xbc: /* 1/4 */
5932 case 0xbd: /* 1/2 */
5933 case 0xbe: return('?'); /* 3/4 */
5934 default: return((c < 160) ? xw1as(c) : c);
5944 #endif /* CK_ANSIC */
5945 { /* xl9l2 */ /* Latin-9 to Latin-2... */
5946 if (c < (CHAR)0x80) return(c); /* Save a function call */
5948 case 0xa4: return(UNK); /* Euro */
5949 case 0xa6: return((CHAR)0xa9); /* S Caron */
5950 case 0xa8: return((CHAR)0xb9); /* s Caron */
5951 case 0xb4: return((CHAR)0xae); /* Z Caron */
5952 case 0xb8: return((CHAR)0xaf); /* z Caron */
5953 case 0xbc: return('O'); /* OE digraph */
5954 case 0xbd: return('o'); /* oe digraph */
5955 case 0xbe: return('Y'); /* Y diaeresis */
5956 default: return(xl1l2(c)); /* The rest is like Latin-1 */
5968 #endif /* CK_ANSIC */
5969 { /* xl958 */ /* Latin-9 to CP858... */
5970 if (c == 0xa4) /* Euro Symbol */
5972 else if (c == 0x9e) /* This was currency symbol */
5983 #endif /* CK_ANSIC */
5984 { /* x58as */ /* CP858 to US ASCII... */
5985 if (c == 0xd5) /* Euro rather than dotless i */
5988 return(x85as(c)); /* The rest is like CP850 */
5996 #endif /* CK_ANSIC */
5997 { /* x58l1 */ /* CP858 to Latin-1... */
5998 if (c == 0xd5) /* Euro rather than dotless i */
5999 return((CHAR)0xa4); /* Return currency symbol */
6000 else if (c == 0xcf) /* This keeps it invertible */
6012 #endif /* CK_ANSIC */
6013 { /* x58l2 */ /* CP858 to Latin-2... */
6014 if (c == 0xd5) /* Euro rather than dotless i */
6015 return((CHAR)0xa4); /* Return currency symbol */
6016 else if (c == 0xcf) /* This keeps it invertible */
6017 return((CHAR)0x9e); /* (if it ever was...) */
6018 else /* Otherwise like CP850 */
6030 #endif /* CK_ANSIC */
6031 { /* x58l9 */ /* CP-858 to Latin-9... */
6032 if (c == 0xd5) /* Euro rather than dotless i */
6033 return((CHAR)0xa4); /* Return currency symbol */
6034 else if (c == 0xcf) /* This keeps it invertible */
6035 return((CHAR)0x9e); /* (if it ever was...) */
6036 else /* Otherwise like CP850 */
6037 return(x85l1(c)); /* to Latin-1 */
6040 /* End Euro functions */
6043 /* TABLES OF TRANSLATION FUNCTIONS */
6046 First, the table of translation functions for RECEIVING files. That is,
6047 *from* the TRANSFER character set *to* the FILE character set, an array of
6048 pointers to functions. The first index is the TRANSFER CHARACTER-SET
6049 number, the second index is the FILE CHARACTER-SET number.
6051 These arrays must be fully populated, even if (as is the case with Kanji
6052 character sets), all the entries are NULL. Otherwise, subscript
6053 calculations will be wrong and we'll use the wrong functions.
6056 /* Pointers to byte-for-byte translation functions */
6058 _PROTOTYP( CHAR (*rx), (CHAR) );
6059 _PROTOTYP( CHAR (*sx), (CHAR) );
6062 _PROTOTYP( int (*xut), (USHORT) ); /* Translation function UCS to TCS */
6063 _PROTOTYP( int (*xuf), (USHORT) ); /* Translation function UCS to FCS */
6064 _PROTOTYP( USHORT (*xtu), (CHAR) ); /* Translation function TCS to UCS */
6065 _PROTOTYP( USHORT (*xfu), (CHAR) ); /* Translation function FCS to UCS */
6066 #endif /* UNICODE */
6069 CHAR (*xlr[MAXTCSETS+1][MAXFCSETS+1])(CHAR) =
6071 CHAR (*xlr[MAXTCSETS+1][MAXFCSETS+1])() =
6072 #endif /* CK_ANSIC */
6074 NULL, /* 0,0 transparent to us ascii */
6075 NULL, /* 0,1 transparent to uk ascii */
6076 NULL, /* 0,2 transparent to dutch nrc */
6077 NULL, /* 0,3 transparent to finnish nrc */
6078 NULL, /* 0,4 transparent to french nrc */
6079 NULL, /* 0,5 transparent to fr-canadian nrc */
6080 NULL, /* 0,6 transparent to german nrc */
6081 NULL, /* 0,7 transparent to hungarian nrc */
6082 NULL, /* 0,8 transparent to italian nrc */
6083 NULL, /* 0,9 transparent to norge/danish nrc */
6084 NULL, /* 0,10 transparent to portuguese nrc */
6085 NULL, /* 0,11 transparent to spanish nrc */
6086 NULL, /* 0,12 transparent to swedish nrc */
6087 NULL, /* 0,13 transparent to swiss nrc */
6088 NULL, /* 0,14 transparent to latin-1 */
6089 NULL, /* 0,15 transparent to latin-2 */
6090 NULL, /* 0,16 transparent to DEC MCS */
6091 NULL, /* 0,17 transparent to NeXT */
6092 NULL, /* 0,18 transparent to CP437 */
6093 NULL, /* 0,19 transparent to CP850 */
6094 NULL, /* 0,20 transparent to CP852 */
6095 NULL, /* 0,21 transparent to Macintosh Latin */
6096 NULL, /* 0,22 transparent to DGI */
6097 NULL, /* 0,23 transparent to HP */
6098 NULL, /* 0,24 transparent to Latin/Cyrillic */
6099 NULL, /* 0,25 transparent to CP866 */
6100 NULL, /* 0,26 transparent to Short KOI-7 */
6101 NULL, /* 0,27 transparent to Old KOI-8 Cyrillic */
6102 NULL, /* 0,28 transparent to JIS-7 */
6103 NULL, /* 0,29 transparent to Shift-JIS */
6104 NULL, /* 0,30 transparent to J-EUC */
6105 NULL, /* 0,31 transparent to DEC Kanji */
6106 NULL, /* 0,32 transparent to Hebrew-7 */
6107 NULL, /* 0,33 transparent to Latin/Hebrew */
6108 NULL, /* 0,34 transparent to CP862 Hebrew */
6109 NULL, /* 0,35 transparent to ELOT 927 Greek */
6110 NULL, /* 0,36 transparent to Latin/Greek */
6111 NULL, /* 0,37 transparent to CP869 */
6112 NULL, /* 0,38 transparent to Latin-9 */
6113 NULL, /* 0,39 transparent to CP858 */
6114 NULL, /* 0,40 transparent to CP855 */
6115 NULL, /* 0,41 transparent to CP1251 */
6116 NULL, /* 0,42 transparent to Bulgarian */
6117 NULL, /* 0,43 transparent to CP1250 */
6118 NULL, /* 0,44 transparent to Mazovia */
6119 NULL, /* 0,45 transparent to UCS-2 */
6120 NULL, /* 0,46 transparent to UTF-8 */
6121 NULL, /* 0,47 transparent to KOI8R */
6122 NULL, /* 0,48 transparent to KOI8U */
6123 NULL, /* 0,49 transparent to CP1252 */
6124 NULL, /* 1,0 ascii to us ascii */
6125 NULL, /* 1,1 ascii to uk ascii */
6126 NULL, /* 1,2 ascii to dutch nrc */
6127 NULL, /* 1,3 ascii to finnish nrc */
6128 NULL, /* 1,4 ascii to french nrc */
6129 NULL, /* 1,5 ascii to fr-canadian nrc */
6130 NULL, /* 1,6 ascii to german nrc */
6131 NULL, /* 1,7 ascii to hungarian nrc */
6132 NULL, /* 1,8 ascii to italian nrc */
6133 NULL, /* 1,9 ascii to norge/danish nrc */
6134 NULL, /* 1,10 ascii to portuguese nrc */
6135 NULL, /* 1,11 ascii to spanish nrc */
6136 NULL, /* 1,12 ascii to swedish nrc */
6137 NULL, /* 1,13 ascii to swiss nrc */
6138 NULL, /* 1,14 ascii to latin-1 */
6139 NULL, /* 1,15 ascii to latin-2 */
6140 NULL, /* 1,16 ascii to DEC MCS */
6141 NULL, /* 1,17 ascii to NeXT */
6142 NULL, /* 1,18 ascii to CP437 */
6143 NULL, /* 1,19 ascii to CP850 */
6144 NULL, /* 1,20 ascii to CP852 */
6145 NULL, /* 1,21 ascii to Macintosh Latin */
6146 NULL, /* 1,22 ascii to DGI */
6147 NULL, /* 1,23 ascii to HP */
6148 xaslc, /* 1,24 ascii to Latin/Cyrillic */
6149 xasac, /* 1,25 ascii to CP866 */
6150 xassk, /* 1,26 ascii to Short KOI */
6151 xask8, /* 1,27 ascii to Old KOI-8 Cyrillic */
6152 NULL, /* 1,28 ascii to JIS-7 */
6153 NULL, /* 1,29 ascii to Shift-JIS */
6154 NULL, /* 1,30 ascii to J-EUC */
6155 NULL, /* 1,31 ascii to DEC Kanji */
6156 xash7, /* 1,32 ascii to Hebrew-7 */
6157 NULL, /* 1,33 ascii to Latin/Hebrew */
6158 NULL, /* 1,34 ascii to CP862 Hebrew */
6159 xaseg, /* 1,35 ascii to ELOT 927 Greek */
6160 NULL, /* 1,36 ascii to Latin/Greek */
6161 NULL, /* 1,37 ascii to CP869 */
6162 NULL, /* 1,38 ascii to Latin-9 */
6163 NULL, /* 1,39 ascii to CP858 */
6164 xas55, /* 1,40 ascii to CP855 */
6165 xas1251, /* 1,41 ascii to CP1251 */
6166 xleft128, /* 1,42 ascii to bulgarian */
6167 xleft128, /* 1,43 ascii to CP1250 */
6168 xleft128, /* 1,44 ascii to Mazovia */
6169 NULL, /* 1,45 ascii to UCS-2 */
6170 NULL, /* 1,46 ascii to UTF-8 */
6171 NULL, /* 1,47 ascii to KOI8-R */
6172 NULL, /* 1,48 ascii to KOI8-U */
6173 NULL, /* 1,49 ascii to CP1252 */
6174 zl1as, /* 2,0 latin-1 to us ascii */
6175 xl1uk, /* 2,1 latin-1 to uk ascii */
6176 xl1du, /* 2,2 latin-1 to dutch nrc */
6177 xl1fi, /* 2,3 latin-1 to finnish nrc */
6178 xl1fr, /* 2,4 latin-1 to french nrc */
6179 xl1fc, /* 2,5 latin-1 to fr-canadian nrc */
6180 xl1ge, /* 2,6 latin-1 to german nrc */
6181 xl1it, /* 2,7 latin-1 to italian nrc */
6182 xl1hu, /* 2,8 latin-1 to hungarian nrc */
6183 xl1no, /* 2,9 latin-1 to norge/danish nrc */
6184 xl1po, /* 2,10 latin-1 to portuguese nrc */
6185 xl1sp, /* 2,11 latin-1 to spanish nrc */
6186 xl1sw, /* 2,12 latin-1 to swedish nrc */
6187 xl1ch, /* 2,13 latin-1 to swiss nrc */
6188 NULL, /* 2,14 latin-1 to latin-1 */
6189 xl1l2, /* 2,15 latin-1 to latin-2 */
6190 xl1dm, /* 2,16 latin-1 to DEC MCS */
6191 xl1ne, /* 2,17 latin-1 to NeXT */
6192 xl143, /* 2,18 latin-1 to CP437 */
6193 xl185, /* 2,19 latin-1 to CP850 */
6194 xl152, /* 2,20 latin-1 to CP852 */
6195 xl1aq, /* 2,21 latin-1 to Macintosh Latin */
6196 xl1dg, /* 2,22 latin-1 to DGI */
6197 xl1r8, /* 2,23 latin-1 to HP Roman8 */
6198 zl1as, /* 2,24 latin-1 to Latin/Cyrillic */
6199 zl1as, /* 2,25 latin-1 to CP866 */
6200 xl1sk, /* 2,26 latin-1 to Short KOI */
6201 zl1as, /* 2,27 latin-1 to Old KOI-8 Cyrillic */
6202 NULL, /* 2,28 latin-1 to JIS-7 */
6203 NULL, /* 2,29 latin-1 to Shift-JIS */
6204 NULL, /* 2,30 latin-1 to J-EUC */
6205 NULL, /* 2,31 latin-1 to DEC Kanji */
6206 xl1h7, /* 2,32 latin-1 to Hebrew-7 */
6207 xl1lh, /* 2,33 latin-1 to Latin/Hebrew */
6208 xl162, /* 2,34 latin-1 to CP862 Hebrew */
6209 xl1eg, /* 2,35 latin-1 to ELOT 927 Greek */
6210 xl1lg, /* 2,36 latin-1 to Latin/Greek */
6211 xl169, /* 2,37 latin-1 to CP869 */
6212 NULL, /* 2,38 latin-1 to Latin9 */
6213 xl185, /* 2,39 latin-1 to CP858 */
6214 zl1as, /* 2,40 latin-1 to CP855 */
6215 zl1as, /* 2,41 latin-1 to CP1251 */
6216 zl1as, /* 2,42 latin-1 to Bulgarian */
6217 xl11250, /* 2,43 latin-1 to CP1250 */
6218 xl1mz, /* 2,44 latin-1 to Mazovia */
6219 NULL, /* 2,45 latin-1 to UCS-2 */
6220 NULL, /* 2,46 latin-1 to UTF-8 */
6221 zl1as, /* 2,47 latin-1 to KOI8R */
6222 zl1as, /* 2,48 latin-1 to KOI8U */
6223 xl1w1, /* 2,49 latin-1 to CP1252 */
6224 xl2as, /* 3,0 latin-2 to us ascii */
6225 xl2as, /* 3,1 latin-2 to uk ascii */
6226 xl2as, /* 3,2 latin-2 to dutch nrc */
6227 xl2as, /* 3,3 latin-2 to finnish nrc */
6228 xl2as, /* 3,4 latin-2 to french nrc */
6229 xl2as, /* 3,5 latin-2 to fr-canadian nrc */
6230 xl2as, /* 3,6 latin-2 to german nrc */
6231 xl2as, /* 3,7 latin-2 to italian nrc */
6232 xl2as, /* 3,8 latin-2 to hungarian nrc */
6233 xl2as, /* 3,9 latin-2 to norge/danish nrc */
6234 xl2as, /* 3,10 latin-2 to portuguese nrc */
6235 xl2as, /* 3,11 latin-2 to spanish nrc */
6236 xl2as, /* 3,12 latin-2 to swedish nrc */
6237 xl2as, /* 3,13 latin-2 to swiss nrc */
6238 xl2l1, /* 3,14 latin-2 to latin-1 */
6239 NULL, /* 3,15 latin-2 to latin-2 */
6240 xl2l1, /* 3,16 latin-2 to DEC MCS */
6241 xl2ne, /* 3,17 latin-2 to NeXT */
6242 xl243, /* 3,18 latin-2 to CP437 */
6243 xl285, /* 3,19 latin-2 to CP850 */
6244 xl252, /* 3,20 latin-2 to CP852 */
6245 xl2aq, /* 3,21 latin-2 to Macintosh Latin */
6246 xl2dg, /* 3,22 latin-2 to DGI */
6247 xl2r8, /* 3,23 latin-2 to HP */
6248 xl2as, /* 3,24 latin-2 to Latin/Cyrillic */
6249 xl2as, /* 3,25 latin-2 to CP866 */
6250 xl2sk, /* 3,26 latin-2 to Short KOI */
6251 xl2as, /* 3,27 latin-2 to Old KOI-8 Cyrillic */
6252 NULL, /* 3,28 latin-2 to JIS-7 */
6253 NULL, /* 3,29 latin-2 to Shift-JIS */
6254 NULL, /* 3,30 latin-2 to J-EUC */
6255 NULL, /* 3,31 latin-2 to DEC Kanji */
6256 xl2h7, /* 3,32 latin-2 to Hebrew-7 */
6257 xl2as, /* 3,33 latin-2 to Latin/Hebrew */
6258 xl2as, /* 3,34 latin-2 to CP862 Hebrew */
6259 xassk, /* 3,35 latin-2 to ELOT 927 Greek */
6260 xl2as, /* 3,36 latin-2 to Latin/Greek */
6261 xl2as, /* 3,37 latin-2 to CP869 */
6262 xl2l9, /* 3,38 latin-2 to Latin-9 */
6263 xl258, /* 3,39 latin-2 to CP858 */
6264 xl2as, /* 3,40 latin-2 to CP855 */
6265 xl2as, /* 3,41 latin-2 to CP1251 */
6266 xl2as, /* 3,42 latin-2 to Bulgarian */
6267 xl21250, /* 3,43 latin-2 to CP1250 */
6268 xl2mz, /* 3,44 latin-2 to Mazovia */
6269 NULL, /* 3,45 latin-2 to UCS-2 */
6270 NULL, /* 3,46 latin-2 to UTF-8 */
6271 xl2as, /* 3,47 latin-2 to KOI8R */
6272 xl2as, /* 3,48 latin-2 to KOI8U */
6273 xl2w1, /* 3,49 latin-2 to CP1252 */
6274 xlcas, /* 4,0 latin/cyrillic to us ascii */
6275 xlcas, /* 4,1 latin/cyrillic to uk ascii */
6276 xlcas, /* 4,2 latin/cyrillic to dutch nrc */
6277 xlcas, /* 4,3 latin/cyrillic to finnish ascii */
6278 xlcas, /* 4,4 latin/cyrillic to french nrc */
6279 xlcas, /* 4,5 latin/cyrillic to fr-canadian nrc */
6280 xlcas, /* 4,6 latin/cyrillic to german nrc */
6281 xlcas, /* 4,7 latin/cyrillic to italian nrc */
6282 xlcas, /* 4,8 latin/cyrillic to hungarian nrc */
6283 xlcas, /* 4,9 latin/cyrillic to norge/danish nrc */
6284 xlcas, /* 4,10 latin/cyrillic to portuguese nrc */
6285 xlcas, /* 4,11 latin/cyrillic to spanish nrc */
6286 xlcas, /* 4,12 latin/cyrillic to swedish nrc */
6287 xlcas, /* 4,13 latin/cyrillic to swiss nrc */
6288 xlcas, /* 4,14 latin/cyrillic to latin-1 */
6289 xlcas, /* 4,15 latin/cyrillic to latin-2 */
6290 xlcas, /* 4,16 latin/cyrillic to DEC MCS */
6291 xlcas, /* 4,17 latin/cyrillic to NeXT */
6292 xlcas, /* 4,18 latin/cyrillic to CP437 */
6293 xlcas, /* 4,19 latin/cyrillic to CP850 */
6294 xlcas, /* 4,20 latin/cyrillic to CP852 */
6295 xlcas, /* 4,21 latin/cyrillic to Macintosh Latin */
6296 xlcas, /* 4,22 latin/cyrillic to DGI */
6297 xlcas, /* 4,23 latin/cyrillic to HP */
6298 NULL, /* 4,24 latin/cyrillic to Latin/Cyrillic */
6299 xlcac, /* 4,25 latin/cyrillic to CP866 */
6300 xlcsk, /* 4,26 latin/cyrillic to Short KOI */
6301 xlck8, /* 4,27 latin/cyrillic to Old KOI-8 Cyrillic */
6302 NULL, /* 4,28 latin/cyril to JIS-7 */
6303 NULL, /* 4,29 latin/cyril to Shift-JIS */
6304 NULL, /* 4,30 latin/cyril to J-EUC */
6305 NULL, /* 4,31 latin/cyril to DEC Kanji */
6306 xlch7, /* 4,32 latin/cyril to Hebrew-7 */
6307 xlcas, /* 4,33 latin/cyril to Latin/Hebrew */
6308 xlcas, /* 4,34 latin/cyril to CP862 Hebrew */
6309 xassk, /* 4,35 latin/cyril to ELOT 927 Greek */
6310 xleft160, /* 4,36 latin/cyril to Latin/Greek */
6311 xleft128, /* 4,37 latin/cyril to CP869 */
6312 xlcas, /* 4,38 latin/cyril to latin-9 */
6313 xlcas, /* 4,39 latin/cyril to CP858 */
6314 xlc55, /* 4,40 latin/cyril to CP855 */
6315 xlc1251, /* 4,41 latin/cyril to CP1251 */
6316 xlcbu, /* 4,42 latin/cyril to Bulgarian */
6317 xlcas, /* 4,43 latin/cyril to CP1250 */
6318 xlcas, /* 4,44 latin/cyril to Mazovia */
6319 NULL, /* 4,45 latin/cyril to UCS-2 */
6320 NULL, /* 4,46 latin/cyril to UTF-8 */
6321 xlckr, /* 4,47 latin/cyril to KOI8R */
6322 xlcku, /* 4,48 latin/cyril to KOI8U */
6323 xlcas, /* 4,49 latin/cyril to CP1252 */
6374 xlhas, /* 6,0 latin/hebrew to us ascii */
6375 xlhas, /* 6,1 latin/hebrew to uk ascii */
6376 xlhas, /* 6,2 latin/hebrew to dutch nrc */
6377 xlhas, /* 6,3 latin/hebrew to finnish ascii */
6378 xlhas, /* 6,4 latin/hebrew to french nrc */
6379 xlhas, /* 6,5 latin/hebrew to fr-canadian nrc */
6380 xlhas, /* 6,6 latin/hebrew to german nrc */
6381 xlhas, /* 6,7 latin/hebrew to italian nrc */
6382 xlhas, /* 6,8 latin/hebrew to hungarian nrc */
6383 xlhas, /* 6,9 latin/hebrew to norge/danish nrc */
6384 xlhas, /* 6,10 latin/hebrew to portuguese nrc */
6385 xlhas, /* 6,11 latin/hebrew to spanish nrc */
6386 xlhas, /* 6,12 latin/hebrew to swedish nrc */
6387 xlhas, /* 6,13 latin/hebrew to swiss nrc */
6388 xlhl1, /* 6,14 latin/hebrew to latin-1 */
6389 xlhas, /* 6,15 latin/hebrew to latin-2 */
6390 xlhl1, /* 6,16 latin/hebrew to DEC MCS */
6391 xlhas, /* 6,17 latin/hebrew to NeXT */
6392 xlhas, /* 6,18 latin/hebrew to CP437 */
6393 xlhas, /* 6,19 latin/hebrew to CP850 */
6394 xlhas, /* 6,20 latin/hebrew to CP852 */
6395 xlhas, /* 6,21 latin/hebrew to Macintosh Latin */
6396 xlhas, /* 6,22 latin/hebrew to DGI */
6397 xlhas, /* 6,23 latin/hebrew to HP */
6398 xlhas, /* 6,24 latin/hebrew to Latin/Cyrillic */
6399 xlhas, /* 6,25 latin/hebrew to CP866 */
6400 NULL, /* 6,26 latin/hebrew to Short KOI */
6401 xlhas, /* 6,27 latin/hebrew to Old KOI-8 Cyrillic */
6402 NULL, /* 6,28 latin/hebrew to JIS-7 */
6403 NULL, /* 6,29 latin/hebrew to Shift-JIS */
6404 NULL, /* 6,30 latin/hebrew to J-EUC */
6405 NULL, /* 6,31 latin/hebrew to DEC Kanji */
6406 xlhh7, /* 6,32 latin/hebrew to Hebrew-7 */
6407 NULL, /* 6,33 latin/hebrew to Latin/Hebrew */
6408 xlh62, /* 6,34 latin/hebrew to CP862 Hebrew */
6409 NULL, /* 6,35 latin/hebrew to ELOT 927 Greek */
6410 xlhas, /* 6,36 latin/hebrew to Latin/Greek */
6411 xlhas, /* 6,37 latin/hebrew to CP869 */
6412 xlhas, /* 6,38 latin/hebrew to Latin-9 */
6413 xlhas, /* 6,39 latin/hebrew to CP858 */
6414 xlhas, /* 6,40 latin/hebrew to CP855 */
6415 xlhas, /* 6,41 latin/hebrew to CP1251 */
6416 xlhas, /* 6,42 latin/hebrew to Bulgarian */
6417 xlhas, /* 6,43 latin/hebrew to CP1250 */
6418 xlhas, /* 6,44 latin/hebrew to Mazovia */
6419 NULL, /* 6,45 latin/hebrew to UCS-2 */
6420 NULL, /* 6,46 latin/hebrew to UTF-8 */
6421 NULL, /* 6,47 latin/hebrew to KOI8R */
6422 NULL, /* 6,48 latin/hebrew to KOI8U */
6423 xlhw1, /* 6,49 latin/hebrew to CP1252 */
6424 xlgas, /* 7,0 latin/greek to us ascii */
6425 xlgas, /* 7,1 latin/greek to uk ascii */
6426 xlgas, /* 7,2 latin/greek to dutch nrc */
6427 xlgas, /* 7,3 latin/greek to finnish ascii */
6428 xlgas, /* 7,4 latin/greek to french nrc */
6429 xlgas, /* 7,5 latin/greek to fr-canadian nrc */
6430 xlgas, /* 7,6 latin/greek to german nrc */
6431 xlgas, /* 7,7 latin/greek to italian nrc */
6432 xlgas, /* 7,8 latin/greek to hungarian nrc */
6433 xlgas, /* 7,9 latin/greek to norge/danish nrc */
6434 xlgas, /* 7,10 latin/greek to portuguese nrc */
6435 xlgas, /* 7,11 latin/greek to spanish nrc */
6436 xlgas, /* 7,12 latin/greek to swedish nrc */
6437 xlgas, /* 7,13 latin/greek to swiss nrc */
6438 xlgas, /* 7,14 latin/greek to latin-1 */
6439 xlgas, /* 7,15 latin/greek to latin-2 */
6440 xlgas, /* 7,16 latin/greek to DEC MCS */
6441 xlgas, /* 7,17 latin/greek to NeXT */
6442 xlgas, /* 7,18 latin/greek to CP437 */
6443 xlgas, /* 7,19 latin/greek to CP850 */
6444 xlgas, /* 7,20 latin/greek to CP852 */
6445 xlgas, /* 7,21 latin/greek to Macintosh Latin */
6446 xlgas, /* 7,22 latin/greek to DGI */
6447 xlgas, /* 7,23 latin/greek to HP */
6448 xleft160, /* 7,24 latin/greek to Latin/Cyrillic */
6449 xleft128, /* 7,25 latin/greek to CP866 */
6450 xassk, /* 7,26 latin/greek to Short KOI */
6451 xleft160, /* 7,27 latin/greek to Old KOI-8 Greek */
6452 NULL, /* 7,28 latin/greek to JIS-7 */
6453 NULL, /* 7,29 latin/greek to Shift-JIS */
6454 NULL, /* 7,30 latin/greek to J-EUC */
6455 NULL, /* 7,31 latin/greek to DEC Kanji */
6456 NULL, /* 7,32 latin/greek to Hebrew-7 */
6457 xlgas, /* 7,33 latin/greek to Latin/Hebrew */
6458 xlgas, /* 7,34 latin/greek to CP862 Hebrew */
6459 xlgeg, /* 7,35 latin/greek to ELOT 927 Greek */
6460 NULL, /* 7,36 latin/greek to Latin/Greek */
6461 xlg69, /* 7,37 latin/greek to CP869 */
6462 xlgas, /* 7,38 latin/greek to Latin-9 */
6463 xlgas, /* 7,39 latin/greek to CP858 */
6464 xleft128, /* 7,40 latin/greek to CP855 */
6465 xleft128, /* 7,41 latin/greek to CP1251 */
6466 xleft128, /* 7,42 latin/greek to Bulgarian */
6467 xleft128, /* 7,43 latin/greek to CP1250 */
6468 xleft128, /* 7,44 latin/greek to Mazovia */
6469 NULL, /* 7,45 latin/greek to UCS-2 */
6470 NULL, /* 7,46 latin/greek to UTF-8 */
6471 NULL, /* 7,47 latin/greek to KOI8R */
6472 NULL, /* 7,48 latin/greek to KOI8U */
6473 xlgw1, /* 7,49 latin/greek to CP1252 */
6474 zl9as, /* 8,0 latin-9 to us ascii */
6475 xl1uk, /* 8,1 latin-9 to uk ascii */
6476 xl1du, /* 8,2 latin-9 to dutch nrc */
6477 xl1fi, /* 8,3 latin-9 to finnish nrc */
6478 xl1fr, /* 8,4 latin-9 to french nrc */
6479 xl1fc, /* 8,5 latin-9 to fr-canadian nrc */
6480 xl1ge, /* 8,6 latin-9 to german nrc */
6481 xl1it, /* 8,7 latin-9 to italian nrc */
6482 xl1hu, /* 8,8 latin-9 to hungarian nrc */
6483 xl1no, /* 8,9 latin-9 to norge/danish nrc */
6484 xl1po, /* 8,10 latin-9 to portuguese nrc */
6485 xl1sp, /* 8,11 latin-9 to spanish nrc */
6486 xl1sw, /* 8,12 latin-9 to swedish nrc */
6487 xl1ch, /* 8,13 latin-9 to swiss nrc */
6488 NULL, /* 8,14 latin-9 to latin-1 */
6489 xl1l2, /* 8,15 latin-9 to latin-2 */
6490 xl9dm, /* 8,16 latin-9 to DEC MCS */
6491 xl9ne, /* 8,17 latin-9 to NeXT */
6492 xl143, /* 8,18 latin-9 to CP437 */
6493 xl185, /* 8,19 latin-9 to CP850 */
6494 xl152, /* 8,20 latin-9 to CP852 */
6495 xl1aq, /* 8,21 latin-9 to Macintosh Latin */
6496 xl1dg, /* 8,22 latin-9 to DGI */
6497 xl1r8, /* 8,23 latin-9 to HP Roman8 */
6498 zl1as, /* 8,24 latin-9 to Latin/Cyrillic */
6499 zl1as, /* 8,25 latin-9 to CP866 */
6500 xl1sk, /* 8,26 latin-9 to Short KOI */
6501 zl1as, /* 8,27 latin-9 to Old KOI-8 Cyrillic */
6502 NULL, /* 8,28 latin-9 to JIS-7 */
6503 NULL, /* 8,29 latin-9 to Shift-JIS */
6504 NULL, /* 8,30 latin-9 to J-EUC */
6505 NULL, /* 8,31 latin-9 to DEC Kanji */
6506 xl1h7, /* 8,32 latin-9 to Hebrew-7 */
6507 xl1lh, /* 8,33 latin-9 to Latin/Hebrew */
6508 xl162, /* 8,34 latin-9 to CP862 Hebrew */
6509 xl1eg, /* 8,35 latin-9 to ELOT 927 Greek */
6510 xl1lg, /* 8,36 latin-9 to Latin/Greek */
6511 xl169, /* 8,37 latin-9 to CP869 */
6512 NULL, /* 8,38 latin-9 to Latin9 */
6513 xl958, /* 8,39 latin-9 to CP858 */
6514 zl1as, /* 8,40 latin-9 to CP855 */
6515 zl1as, /* 8,41 latin-9 to CP1251 */
6516 xl1as, /* 8,42 latin-9 to Bulgarian */
6517 xl91250, /* 8,43 latin-9 to CP1250 */
6518 xl9mz, /* 8,44 latin-9 to Mazovia */
6519 NULL, /* 8,45 latin-9 to UCS-2 */
6520 NULL, /* 8,46 latin-9 to UTF-8 */
6521 zl1as, /* 8,47 latin-9 to KOI8-R */
6522 zl1as, /* 8,48 latin-9 to KOI8-U */
6523 xl9w1, /* 8,49 latin-9 to CP1252 */
6524 NULL, /* 9,00 Unicode... */
6625 int nxlr = (sizeof(xlr) / sizeof(CHAR *));
6628 Translation function table for sending files.
6629 Array of pointers to functions for translating from the local file
6630 character set to the transfer character set. Indexed in the same
6631 way as the xlr array above, but with the indices reversed.
6634 CHAR (*xls[MAXTCSETS+1][MAXFCSETS+1])(CHAR) =
6636 CHAR (*xls[MAXTCSETS+1][MAXFCSETS+1])() =
6637 #endif /* CK_ANSIC */
6639 NULL, /* 0,0 us ascii to transparent */
6640 NULL, /* 0,1 uk ascii to transparent */
6641 NULL, /* 0,2 dutch nrc to transparent */
6642 NULL, /* 0,3 finnish nrc to transparent */
6643 NULL, /* 0,4 french nrc to transparent */
6644 NULL, /* 0,5 fr-canadian nrc to transparent */
6645 NULL, /* 0,6 german nrc to transparent */
6646 NULL, /* 0,7 hungarian nrc to transparent */
6647 NULL, /* 0,8 italian nrc to transparent */
6648 NULL, /* 0,9 norge/danish nrc to transparent */
6649 NULL, /* 0,10 portuguese nrc to transparent */
6650 NULL, /* 0,11 spanish nrc to transparent */
6651 NULL, /* 0,12 swedish nrc to transparent */
6652 NULL, /* 0,13 swiss nrc to transparent */
6653 NULL, /* 0,14 latin-1 to transparent */
6654 NULL, /* 0,15 latin-2 to transparent */
6655 NULL, /* 0,16 DEC MCS to transparent */
6656 NULL, /* 0,17 NeXT to transparent */
6657 NULL, /* 0,18 CP437 to transparent */
6658 NULL, /* 0,19 CP850 to transparent */
6659 NULL, /* 0,20 CP852 to transparent */
6660 NULL, /* 0,21 Macintosh Latin to transparent */
6661 NULL, /* 0,22 DGI to transparent */
6662 NULL, /* 0,23 HP to transparent */
6663 NULL, /* 0,24 Latin/Cyrillic to transparent */
6664 NULL, /* 0,25 CP866 to transparent */
6665 NULL, /* 0,26 Short KOI to transparent */
6666 NULL, /* 0,27 Old KOI-8 to transparent */
6667 NULL, /* 0,28 JIS-7 to transparent */
6668 NULL, /* 0,29 Shift JIS to transparent */
6669 NULL, /* 0,30 Japanese EUC to transparent */
6670 NULL, /* 0,31 DEC Kanji to transparent */
6671 NULL, /* 0,32 Hebrew-7 to transparent */
6672 NULL, /* 0,33 Latin/Hebrew to transparent */
6673 NULL, /* 0,34 CP862 Hebrew to transparent */
6674 NULL, /* 0,35 ELOT 927 Greek to transparent */
6675 NULL, /* 0,36 Latin/Greek to transparent */
6676 NULL, /* 0,37 CP869 to transparent */
6677 NULL, /* 0,38 Latin-9 to transparent */
6678 NULL, /* 0,39 CP858 to transparent */
6679 NULL, /* 0,40 CP855 to transparent */
6680 NULL, /* 0,41 CP1251 to transparent */
6681 NULL, /* 0,42 Bulgarian to transparent */
6682 NULL, /* 0,43 CP1250 to transparent */
6683 NULL, /* 0,44 Mazovia to transparent */
6684 NULL, /* 0,45 UCS-2 to transparent */
6685 NULL, /* 0,46 UTF-8 to transparent */
6686 NULL, /* 0,47 KOI8R to transparent */
6687 NULL, /* 0,48 KOI8U to transparent */
6688 NULL, /* 0,49 CP1252 to transparent */
6689 NULL, /* 1,0 us ascii to ascii */
6690 NULL, /* 1,1 uk ascii to ascii */
6691 xduas, /* 1,2 dutch nrc to ascii */
6692 xfias, /* 1,3 finnish nrc to ascii */
6693 xfras, /* 1,4 french nrc to ascii */
6694 xfcas, /* 1,5 french canadian nrc to ascii */
6695 xgeas, /* 1,6 german nrc to ascii */
6696 xhuas, /* 1,7 hungarian nrc to ascii */
6697 xitas, /* 1,8 italian nrc to ascii */
6698 xnoas, /* 1,9 norwegian/danish nrc to ascii */
6699 xpoas, /* 1,10 portuguese nrc to ascii */
6700 xspas, /* 1,11 spanish nrc to ascii */
6701 xswas, /* 1,12 swedish nrc to ascii */
6702 xchas, /* 1,13 swiss nrc to ascii */
6703 xl1as, /* 1,14 latin-1 to ascii */
6704 xl2as, /* 1,15 latin-2 to ascii */
6705 xdmas, /* 1,16 dec mcs to ascii */
6706 xneas, /* 1,17 NeXT to ascii */
6707 x43as, /* 1,18 CP437 to ascii */
6708 x85as, /* 1,19 CP850 to ascii */
6709 x52as, /* 1,20 CP850 to ascii */
6710 xaqas, /* 1,21 Macintosh Latin to ascii */
6711 xdgas, /* 1,22 DGI to ascii */
6712 xr8as, /* 1,23 HP to ASCII */
6713 xlcas, /* 1,24 Latin/Cyrillic to ASCII */
6714 xacas, /* 1,25 CP866 to ASCII */
6715 xskas, /* 1,26 Short KOI to ASCII */
6716 xk8as, /* 1,27 Old KOI-8 Cyrillic to ASCII */
6721 xh7as, /* 1,32 Hebrew-7 to ASCII */
6722 xlhas, /* 1,33 Latin/Hebrew to ASCII */
6723 x62as, /* 1,34 CP862 Hebrew to ASCII */
6724 xegas, /* 1,35 ELOT 927 Greek to ASCII */
6725 xlgas, /* 1,36 Latin/Greek to ASCII */
6726 x69as, /* 1,37 CP869 to ASCII */
6727 xl9as, /* 1,38 Latin-9 to ASCII */
6728 x58as, /* 1,39 CP858 to ASCII */
6729 x55as, /* 1,40 CP855 to ASCII */
6730 x1251as, /* 1,41 CP1251 to ASCII */
6731 xleft128, /* 1,42 Bulgarian to ASCII */
6732 x1250as, /* 1,43 CP1250 to ASCII */
6733 xmzas, /* 1,44 Mazovia to ASCII */
6734 NULL, /* 1,45 UCS-2 to ASCII */
6735 NULL, /* 1,46 UTF-8 to ASCII */
6736 xk8as, /* 1,47 KOI8R to ASCII */
6737 xk8as, /* 1,48 KOI8U to ASCII */
6738 xw1as, /* 1,49 CP1252 to ASCII */
6739 NULL, /* 2,0 us ascii to latin-1 */
6740 xukl1, /* 2,1 uk ascii to latin-1 */
6741 xdul1, /* 2,2 dutch nrc to latin-1 */
6742 xfil1, /* 2,3 finnish nrc to latin-1 */
6743 xfrl1, /* 2,4 french nrc to latin-1 */
6744 xfcl1, /* 2,5 french canadian nrc to latin-1 */
6745 xgel1, /* 2,6 german nrc to latin-1 */
6746 xhul1, /* 2,7 hungarian nrc to latin-1 */
6747 xitl1, /* 2,8 italian nrc to latin-1 */
6748 xnol1, /* 2,9 norwegian/danish nrc to latin-1 */
6749 xpol1, /* 2,10 portuguese nrc to latin-1 */
6750 xspl1, /* 2,11 spanish nrc to latin-1 */
6751 xswl1, /* 2,12 swedish nrc to latin-1 */
6752 xchl1, /* 2,13 swiss nrc to latin-1 */
6753 NULL, /* 2,14 latin-1 to latin-1 */
6754 xl2l1, /* 2,15 latin-2 to latin-1 */
6755 xdml1, /* 2,16 dec mcs to latin-1 */
6756 xnel1, /* 2,17 NeXT to Latin-1 */
6757 x43l1, /* 2,18 CP437 to Latin-1 */
6758 x85l1, /* 2,19 CP850 to Latin-1 */
6759 x52l1, /* 2,20 CP852 to Latin-1 */
6760 xaql1, /* 2,21 Macintosh Latin to Latin-1 */
6761 xdgl1, /* 2,22 DGI to Latin-1 */
6762 xr8l1, /* 2,23 HP to Latin-1 */
6763 xlcas, /* 2,24 Latin/Cyrillic to Latin-1 */
6764 xacas, /* 2,25 CP866 to Latin-1 */
6765 xskas, /* 2,26 Short KOI to Latin-1 */
6766 xk8as, /* 2,27 Old KOI-8 Cyrillic to Latin-1 */
6767 NULL, /* 2,28 Kanji ... */
6771 xh7as, /* 2,32 Hebrew-7 to Latin-1 */
6772 xlhl1, /* 2,33 Latin/Hebrew to Latin-1 */
6773 x62l1, /* 2,34 CP862 Hebrew to Latin-1 */
6774 xegas, /* 2,35 ELOT 927 Greek to Latin-1 */
6775 xlgl1, /* 2,36 Latin/Greek to Latin-1 */
6776 NULL, /* 2,37 CP869 to Latin-1 */
6777 NULL, /* 2,38 Latin-9 to Latin-1 */
6778 x58l1, /* 2,39 CP858 to Latin-1 */
6779 x55as, /* 2,40 CP855 to Latin-1 */
6780 x1251as, /* 2,41 CP1251 to Latin-1 */
6781 xleft128, /* 2,42 Bulgarian to Latin-1 */
6782 x1250l1, /* 2,43 CP1250 to Latin-1 */
6783 xmzl1, /* 2,44 Mazovia to Latin-1 */
6784 NULL, /* 2,45 UCS-2 to Latin-1 */
6785 NULL, /* 2,46 UTF-8 to Latin-1 */
6786 xk8as, /* 2,47 KOI8R to Latin-1 */
6787 xk8as, /* 2,48 KOI8U to Latin-1 */
6788 xw1l1, /* 2,49 CP1252 to Latin-1 */
6789 NULL, /* 3,0 us ascii to latin-2 */
6790 NULL, /* 3,1 uk ascii to latin-2 */
6791 xduas, /* 3,2 dutch nrc to latin-2 */
6792 xfias, /* 3,3 finnish nrc to latin-2 */
6793 xfras, /* 3,4 french nrc to latin-2 */
6794 xfcas, /* 3,5 french canadian nrc to latin-2 */
6795 xgel2, /* 3,6 german nrc to latin-2 */
6796 xhul2, /* 3,7 hungarian nrc to latin-2 */
6797 xitas, /* 3,8 italian nrc to latin-2 */
6798 xnoas, /* 3,9 norwegian/danish nrc to latin-2 */
6799 xpoas, /* 3,10 portuguese nrc to latin-2 */
6800 xspas, /* 3,11 spanish nrc to latin-2 */
6801 xswas, /* 3,12 swedish nrc to latin-2 */
6802 xchas, /* 3,13 swiss nrc to latin-2 */
6803 xl1l2, /* 3,14 latin-1 to latin-2 */
6804 NULL, /* 3,15 latin-2 to latin-2 */
6805 xl1l2, /* 3,16 dec mcs to latin-2 */
6806 xnel2, /* 3,17 NeXT to Latin-2 */
6807 x43l2, /* 3,18 CP437 to Latin-2 */
6808 x85l2, /* 3,19 CP850 to Latin-2 */
6809 x52l2, /* 3,20 CP852 to Latin-2 */
6810 xaql2, /* 3,21 Macintosh Latin to Latin-2 */
6811 xdgl2, /* 3,22 DGI to Latin-2 */
6812 xr8l2, /* 3,23 HP to Latin-2 */
6813 xlcas, /* 3,24 Latin/Cyrillic to Latin-2 */
6814 xacas, /* 3,25 CP866 to Latin-2 */
6815 xskas, /* 3,26 Short KOI to Latin-2 */
6816 xk8as, /* 3,27 Old KOI-8 Cyrillic to Latin-2 */
6817 NULL, /* 3,28 Kanji ... */
6821 xh7as, /* 3,32 Hebrew-7 to Latin-2 */
6822 xlhas, /* 3,33 Latin/Hebrew to Latin-2 */
6823 x62as, /* 3,34 CP862 Hebrew to Latin-2 */
6824 xegas, /* 3,35 ELOT 927 Greek to Latin-2 */
6825 xl2lg, /* 3,36 Latin/Greek to Latin-2 */
6826 xleft128, /* 3,37 CP869 to Latin-2 */
6827 xl9l2, /* 3,38 Latin-9 to Latin-2 */
6828 x58l2, /* 3,39 CP858 to Latin-2 */
6829 x55as, /* 3,40 CP855 to Latin-2 */
6830 x1251as, /* 3,41 CP1251 to Latin-2 */
6831 xleft128, /* 3,42 Bulgarian to Latin-2 */
6832 x1250l2, /* 3,43 CP1250 to Latin-2 */
6833 xmzl2, /* 3,44 Mazovia to Latin-2 */
6834 NULL, /* 3,45 UCS-2 to Latin-2 */
6835 NULL, /* 3,46 UTF-8 to Latin-2 */
6836 xk8as, /* 3,47 KOI8R to Latin-2 */
6837 xk8as, /* 3,48 KOI8U to Latin-2 */
6838 xw1l2, /* 3,49 CP1252 to latin-2 */
6839 xaslc, /* 4,0 us ascii to latin/cyrillic */
6840 xaslc, /* 4,1 uk ascii to latin/cyrillic */
6841 xduas, /* 4,2 dutch nrc to latin/cyrillic */
6842 xfias, /* 4,3 finnish nrc to latin/cyrillic */
6843 xfras, /* 4,4 french nrc to latin/cyrillic */
6844 xfcas, /* 4,5 french canadian nrc to latin/cyrillic */
6845 xgeas, /* 4,6 german nrc to latin/cyrillic */
6846 xhuas, /* 4,7 hungarian nrc to latin/cyrillic */
6847 xitas, /* 4,8 italian nrc to latin/cyrillic */
6848 xnoas, /* 4,9 norge/danish nrc to latin/cyrillic */
6849 xpoas, /* 4,10 portuguese nrc to latin/cyrillic */
6850 xspas, /* 4,11 spanish nrc to latin/cyrillic */
6851 xswas, /* 4,12 swedish nrc to latin/cyrillic */
6852 xchas, /* 4,13 swiss nrc to latin/cyrillic */
6853 xl1as, /* 4,14 latin-1 to latin/cyrillic */
6854 xl2as, /* 4,15 latin-2 to latin/cyrillic */
6855 xdmas, /* 4,16 dec mcs to latin/cyrillic */
6856 xneas, /* 4,17 NeXT to latin/cyrillic */
6857 x43as, /* 4,18 CP437 to latin/cyrillic */
6858 x85as, /* 4,19 CP850 to latin/cyrillic */
6859 x52as, /* 4,20 CP852 to latin/cyrillic */
6860 xaqas, /* 4,21 Macintosh Latin to latin/cyrillic */
6861 xdgas, /* 4,22 DGI to Latin/Cyrillic */
6862 xr8as, /* 4,23 HP to Latin/Cyrillic */
6863 NULL, /* 4,24 Latin/Cyrillic to Latin/Cyrillic */
6864 xaclc, /* 4,25 CP866 to Latin/Cyrillic */
6865 xskcy, /* 4,26 Short KOI to Latin/Cyrillic */
6866 xk8lc, /* 4,27 Old KOI-8 Cyrillic to Latin/Cyrillic */
6867 NULL, /* 4,28 Kanji... */
6871 xh7as, /* 4,32 Hebrew-7 to Latin/Cyrillic */
6872 xlhas, /* 4,33 Latin/Hebrew to Latin/Cyrillic */
6873 x62as, /* 4,34 CP862 Hebrew to Latin/Cyrillic */
6874 xegas, /* 4,35 ELOT 927 Greek to Latin/Cyrillic */
6875 xleft160, /* 4,36 Latin/Greek to Latin/Cyrillic */
6876 xleft128, /* 4,37 CP869 to Latin/Cyrillic */
6877 xl1as, /* 4,38 latin-9 to latin/cyrillic */
6878 xleft128, /* 4,39 CP858 to Latin/Cyrillic */
6879 x55lc, /* 4,40 CP855 to Latin/Cyrillic */
6880 x1251lc, /* 4,41 CP1251 to Latin/Cyrillic */
6881 xbulc, /* 4,42 Bulgarian to Latin/Cyrillic */
6882 x1250as, /* 4,43 CP1250 to Latin/Cyrillic */
6883 xmzas, /* 4,44 Mazovia to Latin/Cyrillic */
6884 NULL, /* 4,45 UCS-2 to Latin/Cyrillic */
6885 NULL, /* 4,46 UTF-8 to Latin/Cyrillic */
6886 xkrlc, /* 4,47 KOI8R to Latin/Cyrillic */
6887 xkulc, /* 4,48 KOI8U to Latin/Cyrillic */
6888 xw1lc, /* 4,49 CP1252 to Latin/Cyrillic */
6939 NULL, /* 6,0 us ascii to Latin/Hebrew */
6940 NULL, /* 6,1 uk ascii to Latin/Hebrew */
6941 xduas, /* 6,2 dutch nrc to Latin/Hebrew */
6942 xfias, /* 6,3 finnish nrc to Latin/Hebrew */
6943 xfras, /* 6,4 french nrc to Latin/Hebrew */
6944 xfcas, /* 6,5 french canadian nrc to Latin/Hebrew */
6945 xgeas, /* 6,6 german nrc to Latin/Hebrew */
6946 xhuas, /* 6,7 hungarian nrc to Latin/Hebrew */
6947 xitas, /* 6,8 italian nrc to Latin/Hebrew */
6948 xnoas, /* 6,9 norge/danish nrc to Latin/Hebrew */
6949 xpoas, /* 6,10 portuguese nrc to Latin/Hebrew */
6950 xspas, /* 6,11 spanish nrc to Latin/Hebrew */
6951 xswas, /* 6,12 swedish nrc to Latin/Hebrew */
6952 xchas, /* 6,13 swiss nrc to Latin/Hebrew */
6953 xl1lh, /* 6,14 latin-1 to Latin/Hebrew */
6954 xl2as, /* 6,15 latin-2 to Latin/Hebrew */
6955 xdmas, /* 6,16 dec mcs to Latin/Hebrew */
6956 xneas, /* 6,17 NeXT to Latin/Hebrew */
6957 x43as, /* 6,18 CP437 to Latin/Hebrew */
6958 x85as, /* 6,19 CP850 to Latin/Hebrew */
6959 x52as, /* 6,20 CP852 to Latin/Hebrew */
6960 xaqas, /* 6,21 Macintosh Latin to Latin/Hebrew */
6961 xdgas, /* 6,22 DGI to Latin/Hebrew */
6962 xr8as, /* 6,23 HP to Latin/Hebrew */
6963 xlcas, /* 6,24 Latin/Cyrillic to Latin/Hebrew */
6964 xacas, /* 6,25 CP866 to Latin/Hebrew */
6965 xskas, /* 6,26 Short KOI to Latin/Hebrew */
6966 xk8as, /* 6,27 Old KOI-8 Cyrillic to Latin/Hebrew */
6967 NULL, /* 6,28 Kanji... */
6971 xh7lh, /* 6,32 Hebrew-7 to Latin/Hebrew */
6972 NULL, /* 6,33 Latin/Hebrew to Latin/Hebrew */
6973 x62lh, /* 6,34 CP862 Hebrew to Latin/Hebrew */
6974 xegas, /* 6,35 ELOT 927 Greek to Latin/Hebrew */
6975 xlgas, /* 6,36 Latin/Greek to Latin/Hebrew */
6976 x69as, /* 6,37 CP869 to Latin/Hebrew */
6977 xl1as, /* 6,38 latin-9 to Latin/Hebrew */
6978 x58as, /* 6,39 CP858 to Latin/Hebrew */
6979 x55as, /* 6,40 CP855 to Latin/Hebrew */
6980 x1251as, /* 6,41 CP1251 to Latin/Hebrew */
6981 xleft128, /* 6,42 Bulgarian to Latin/Hebrew */
6982 x1250as, /* 6,43 CP1250 to Latin/Hebrew */
6983 xmzas, /* 6,44 Mazovia to Latin/Hebrew */
6984 NULL, /* 6,45 UCS-2 to Latin/Hebrew */
6985 NULL, /* 6,46 UTF-8 to Latin/Hebrew */
6986 NULL, /* 6,47 KOI8R to Latin/Hebrew */
6987 NULL, /* 6,48 KOI8U to Latin/Hebrew */
6988 xw1lh, /* 6,49 CP1252 to Latin/Hebrew */
6989 NULL, /* 7,0 us ascii to Latin/Greek */
6990 NULL, /* 7,1 uk ascii to Latin/Greek */
6991 xduas, /* 7,2 dutch nrc to Latin/Greek */
6992 xfias, /* 7,3 finnish nrc to Latin/Greek */
6993 xfras, /* 7,4 french nrc to Latin/Greek */
6994 xfcas, /* 7,5 french canadian nrc to Latin/Greek */
6995 xgeas, /* 7,6 german nrc to Latin/Greek */
6996 xhuas, /* 7,7 hungarian nrc to Latin/Greek */
6997 xitas, /* 7,8 italian nrc to Latin/Greek */
6998 xnoas, /* 7,9 norge/danish nrc to Latin/Greek */
6999 xpoas, /* 7,10 portuguese nrc to Latin/Greek */
7000 xspas, /* 7,11 spanish nrc to Latin/Greek */
7001 xswas, /* 7,12 swedish nrc to Latin/Greek */
7002 xchas, /* 7,13 swiss nrc to Latin/Greek */
7003 xl1lg, /* 7,14 latin-1 to Latin/Greek */
7004 xl2lg, /* 7,15 latin-2 to Latin/Greek */
7005 xl1lg, /* 7,16 dec mcs to Latin/Greek */
7006 xneas, /* 7,17 NeXT to Latin/Greek */
7007 xleft128, /* 7,18 CP437 to Latin/Greek */
7008 x85as, /* 7,19 CP850 to Latin/Greek */
7009 x52as, /* 7,20 CP852 to Latin/Greek */
7010 xaqas, /* 7,21 Macintosh Latin to Latin/Greek */
7011 xdgas, /* 7,22 DGI to Latin/Greek */
7012 xr8as, /* 7,23 HP to Latin/Greek */
7013 xleft160, /* 7,24 Latin/Cyrillic to Latin/Greek */
7014 xleft128, /* 7,25 CP866 to Latin/Greek */
7015 xskas, /* 7,26 Short KOI to Latin/Greek */
7016 xk8as, /* 7,27 Old KOI-8 Cyrillic to Latin/Greek */
7017 NULL, /* 7,28 Kanji... */
7021 xh7as, /* 7,32 Hebrew-7 to Latin/Greek */
7022 NULL, /* 7,33 Latin/Hebrew to Latin/Greek */
7023 x62as, /* 7,34 CP862 Hebrew to Latin/Greek */
7024 xeglg, /* 7,35 ELOT 927 Greek to Latin/Greek */
7025 NULL, /* 7,36 Latin/Greek to Latin/Greek */
7026 x69lg, /* 7,37 CP869 to Latin/Greek */
7027 xl1as, /* 7,38 latin-9 to Latin/Greek */
7028 xl1as, /* 7,39 latin-9 to Latin/Hebrew*/
7029 xleft128, /* 7,40 CP855 to Latin/Greek */
7030 xleft128, /* 7,41 CP1251 to Latin/Greek */
7031 xleft128, /* 7,42 Bulgarian to Latin/Greek */
7032 x1250as, /* 7,43 CP1250 to Latin/Greek */
7033 xmzas, /* 7,44 Mazovia to Latin/Greek */
7034 NULL, /* 7,45 UCS-2 to Latin/Greek */
7035 NULL, /* 7,46 UTF-8 to Latin/Greek */
7036 NULL, /* 7,47 KOI8R to Latin/Greek */
7037 NULL, /* 7,48 KOI8U to Latin/Greek */
7038 xw1lg, /* 7,49 CP1252 to Latin/Greek */
7039 NULL, /* 8,0 us ascii to latin-9 */
7040 xukl1, /* 8,1 uk ascii to latin-9 */
7041 xdul1, /* 8,2 dutch nrc to latin-9 */
7042 xfil1, /* 8,3 finnish nrc to latin-9 */
7043 xfrl1, /* 8,4 french nrc to latin-9 */
7044 xfcl1, /* 8,5 french canadian nrc to latin-9 */
7045 xgel1, /* 8,6 german nrc to latin-9 */
7046 xhul1, /* 8,7 hungarian nrc to latin-9 */
7047 xitl1, /* 8,8 italian nrc to latin-9 */
7048 xnol1, /* 8,9 norwegian/danish nrc to latin-9 */
7049 xpol1, /* 8,10 portuguese nrc to latin-9 */
7050 xspl1, /* 8,11 spanish nrc to latin-9 */
7051 xswl1, /* 8,12 swedish nrc to latin-9 */
7052 xchl1, /* 8,13 swiss nrc to latin-9 */
7053 NULL, /* 8,14 latin-1 to latin-9 */
7054 xl2l9, /* 8,15 latin-2 to latin-9 */
7055 xdml9, /* 8,16 dec mcs to latin-9 */
7056 xnel9, /* 8,17 NeXT To Latin-9 */
7057 x43l1, /* 8,18 CP437 To Latin-9 */
7058 x85l1, /* 8,19 CP850 To Latin-9 */
7059 x52l1, /* 8,20 CP852 To Latin-9 */
7060 xaql1, /* 8,21 Macintosh Latin To Latin-9 */
7061 xdgl1, /* 8,22 DGI To Latin-9 */
7062 xr8l1, /* 8,23 HP To Latin-9 */
7063 xlcas, /* 8,24 Latin/Cyrillic To Latin-9 */
7064 xacas, /* 8,25 CP866 To Latin-9 */
7065 xskas, /* 8,26 Short KOI To Latin-9 */
7066 xk8as, /* 8,27 Old KOI-8 Cyrillic To Latin-9 */
7067 NULL, /* 8,28 Kanji ... */
7071 xh7as, /* 8,32 Hebrew-7 To Latin-9 */
7072 xlhl1, /* 8,33 Latin/Hebrew To Latin-9 */
7073 x62l1, /* 8,34 CP862 Hebrew To Latin-9 */
7074 xegas, /* 8,35 ELOT 927 Greek To Latin-9 */
7075 xlgl1, /* 8,36 Latin/Greek To Latin-9 */
7076 xl169, /* 8,37 CP869 To Latin-9 */
7077 NULL, /* 8,38 Latin-9 To Latin-9 */
7078 x58l9, /* 8,39 cp858 To Latin-9 */
7079 x55as, /* 8,40 cp855 To Latin-9 */
7080 x55as, /* 8,41 cp1251 To Latin-9 */
7081 xleft128, /* 8,42 Bulgarian To Latin-9 */
7082 x1250l9, /* 8,43 CP1250 To Latin-9 */
7083 xmzl9, /* 8,44 Mazovia To Latin-9 */
7084 NULL, /* 8,45 UCS-2 to Latin-9 */
7085 NULL, /* 8,46 UTF-8 to Latin-9 */
7086 NULL, /* 8,47 KOI8R to Latin-9 */
7087 NULL, /* 8,48 KOI8U to Latin-9 */
7088 xw1l9, /* 8,49 CP1252 to Latin-9 */
7089 NULL, /* 9,00 Unicode... */
7190 int nxls = (sizeof(xls) / sizeof(CHAR *));
7194 The following routines are useful only for terminal character sets, and so
7195 ifdef'd out for NOLOCAL compilations.
7201 Returns nonzero if argument indicates a 7-bit national character set,
7205 cs_is_nrc(x) int x; {
7207 if (x == TX_J201R || x == TX_DECSPEC || x == TX_DECTECH
7208 || txrinfo[x] == NULL)
7211 return(txrinfo[x]->flags & X2U_STD && txrinfo[x]->size == 94);
7213 if ((cs_size(x) == 94))
7217 #endif /* UNICODE */
7223 Returns nonzero if argument indicates an ISO 4873-standard-format
7224 character set, i.e. one in which the control region is NOT used for
7225 graphics; zero otherwise.
7228 cs_is_std(x) int x; {
7230 if (!txrinfo[x]) /* Even more safety */
7232 else if (txrinfo[x]->size == 128) /* Just for safety */
7235 return(txrinfo[x]->flags & X2U_STD); /* Only this should be needed */
7238 case FC_CP437: /* Code pages use C1 graphics */
7245 case FC_APPQD: /* So do Apple and NeXTSTEP */
7248 default: /* Others behave */
7251 #endif /* CKOUINI */
7259 return(txrinfo[x]->size);
7316 #endif /* UNICODE */
7318 #endif /* NOLOCAL */
7321 S E T X L A T Y P E -- Set Translation Type
7323 Sets global xlatype to indicate which kind of translation:
7325 XLA_NONE No translation
7326 XLA_BYTE Byte-for-Byte translation
7327 XLA_JAPAN Japanese Kanji translation
7328 XLA_UNICODE Unicode translations
7330 And sets up the appropriate translation function pointers as follows:
7333 All function pointers are NULL.
7335 For Byte-for-Byte transation:
7336 rx = TCS to FCS (these functions are in this module...)
7339 For Unicode translations:
7340 xfu = FCS to UCS (these functions are in ckcuni.c...)
7346 setxlatype(tcs, fcs) int tcs, fcs; {
7348 xfu = NULL; /* Unicode <-> TCS/FCS functions */
7352 #endif /* UNICODE */
7354 debug(F101,"setxlatype fcs","",fcs);
7355 debug(F101,"setxlatype tcs","",tcs);
7357 if (tcs < 0 || tcs > MAXTCSETS) {
7358 debug(F101,"setxlatype bad tcs","",tcs);
7361 if (fcs < 0 || fcs > MAXFCSETS) {
7362 debug(F101,"setxlatype bad fcs","",fcs);
7365 if (tcs == TC_TRANSP || xfrxla == 0) { /* Transfer charset TRANSPARENT */
7366 debug(F101,"setxlatype transparent because TCS==Transparent","",tcs);
7367 xlatype = XLA_NONE; /* Translation type is None */
7369 /* If any of our charsets is Unicode we use Unicode functions */
7370 /* even if TCS and FCS are the same because of BOM and byte swapping */
7371 } else if (tcs == TC_UCS2 || tcs == TC_UTF8 ||
7372 fcs == FC_UCS2 || fcs == FC_UTF8) {
7373 debug(F101,"setxlatype Unicode tcs","",tcs);
7374 debug(F101,"setxlatype Unicode fcs","",fcs);
7375 /* Unicode <-> TCS/FCS functions */
7376 xfu = xl_fcu[fcs]; /* FCS -> UCS */
7377 xtu = xl_tcu[tcs]; /* TCS -> UCS */
7378 xuf = xl_ufc[fcs]; /* UCS -> FCS */
7379 xut = xl_utc[tcs]; /* UCS -> TCS */
7380 xlatype = XLA_UNICODE; /* Translation type is Unicode */
7382 /* These make trouble in 64-bit land */
7383 debug(F001,"setxlatype Unicode xfu","",(unsigned)xfu);
7384 debug(F001,"setxlatype Unicode xuf","",(unsigned)xuf);
7385 #endif /* COMMENT */
7386 #endif /* UNICODE */
7387 } else if (cseqtab[tcs] == fcs) { /* Or if TCS == FCS */
7388 debug(F101,"setxlatype transparent because TCS==FCS","",tcs);
7389 xlatype = XLA_NONE; /* translation type is also None */
7391 /* Otherwise if any of them is Japanese, we use Kanji functions */
7392 } else if (tcs == TC_JEUC || fcsinfo[fcs].alphabet == AL_JAPAN) {
7393 debug(F101,"setxlatype Japanese tcs","",tcs);
7394 debug(F101,"setxlatype Japanese fcs","",fcs);
7395 xlatype = XLA_JAPAN; /* Translation type is Japanese */
7397 /* Otherwise we use byte functions */
7398 } else { /* Otherwise... */
7399 rx = xlr[tcs][fcs]; /* Input translation function */
7400 sx = xls[tcs][fcs]; /* Output translation function */
7401 debug(F101,"setxlatype Byte tcs","",tcs);
7402 debug(F101,"setxlatype Byte fcs","",fcs);
7403 xlatype = XLA_BYTE; /* Translation type is Byte */
7405 debug(F101,"setxlatype xlatype","",xlatype);
7408 /* Set up translation between two file character sets with UCS intermediate */
7412 initxlate(csin, csout) int csin, csout; {
7418 debug(F101,"initxlate csin","",csin);
7419 debug(F101,"initxlate csout","",csout);
7421 if (csin < 0 || csin > MAXFCSETS) {
7422 debug(F101,"initxlate bad csin","",csin);
7425 if (csout < 0 || csout > MAXFCSETS) {
7426 debug(F101,"initxlate bad csout","",csout);
7429 if (csin == csout && csin != FC_UCS2) {
7430 xlatype = XLA_NONE; /* Translation type is None */
7433 xlatype = XLA_UNICODE; /* Translation type is Unicode */
7434 xfu = xl_fcu[csin]; /* FCS -> UCS */
7435 xuf = xl_ufc[csout]; /* UCS -> FCS */
7436 xpnbyte(-1,0,0,NULL); /* Reset UCS-2 */
7438 debug(F001,"initxlate Unicode xfu","",(unsigned)xfu);
7439 debug(F001,"initxlate Unicode xuf","",(unsigned)xuf);
7440 #endif /* COMMENT */
7441 debug(F101,"initxlate xlatype","",xlatype);
7443 #endif /* UNICODE */
7445 int csetsinited = 0;
7448 initcsets() { /* Routine to reset or initialize */
7449 int i; /* character-set associations. */
7452 if (ucsorder < 0) /* For creating UCS-2 files. */
7453 ucsorder = byteorder;
7456 if (fileorder < 0) /* For reading UCS-2 files. */
7457 fileorder = ucsorder;
7458 #endif /* UNICODE */
7460 debug(F101,"initcsets nxls","",nxls);
7461 debug(F101,"initcsets nxlr","",nxlr);
7463 debug(F101,"initcsets TERM LOCAL CSET","",tcsl);
7464 debug(F101,"initcsets TERM REMOTE CSET","",tcsr);
7466 for (i = 0; i <= MAXFCSETS; i++) /* First clear them all... */
7468 for (i = 0; i <= MAXTCSETS; i++)
7471 /* Now set specific defaults for incoming files */
7475 axcset[TC_TRANSP] = FC_TRANSP;
7476 axcset[TC_USASCII] = FC_USASCII;
7484 axcset[TC_1LATIN] = fcharset;
7487 axcset[TC_1LATIN] = FC_CP850;
7491 axcset[TC_1LATIN] = FC_HPR8;
7494 axcset[TC_1LATIN] = FC_DECMCS;
7497 axcset[TC_1LATIN] = FC_NEXT;
7500 axcset[TC_1LATIN] = FC_DGMCS;
7502 /* Should we use code pages on some PC based UNIXes? */
7503 axcset[TC_1LATIN] = FC_1LATIN;
7504 #endif /* datageneral */
7511 axcset[TC_2LATIN] = FC_CP852;
7512 axcset[TC_CYRILL] = FC_CP866;
7513 axcset[TC_JEUC] = FC_SHJIS;
7514 axcset[TC_HEBREW] = FC_CP862;
7515 axcset[TC_GREEK] = FC_CP869;
7516 axcset[TC_9LATIN] = FC_CP858;
7517 axcset[TC_UCS2] = FC_UCS2;
7518 axcset[TC_UTF8] = FC_UCS2;
7520 axcset[TC_2LATIN] = FC_2LATIN;
7521 axcset[TC_CYRILL] = FC_CYRILL;
7522 axcset[TC_JEUC] = FC_JEUC;
7523 axcset[TC_HEBREW] = FC_HEBREW;
7524 axcset[TC_GREEK] = FC_GREEK;
7525 axcset[TC_9LATIN] = FC_9LATIN;
7526 axcset[TC_UCS2] = FC_UTF8;
7527 axcset[TC_UTF8] = FC_UTF8;
7530 /* And for outbound files */
7532 afcset[FC_USASCII] = TC_USASCII;
7533 afcset[FC_UKASCII] = TC_1LATIN;
7534 afcset[FC_DUASCII] = TC_1LATIN;
7535 afcset[FC_FIASCII] = TC_1LATIN;
7536 afcset[FC_FRASCII] = TC_1LATIN;
7537 afcset[FC_FCASCII] = TC_1LATIN;
7538 afcset[FC_GEASCII] = TC_1LATIN;
7539 afcset[FC_HUASCII] = TC_2LATIN;
7540 afcset[FC_ITASCII] = TC_1LATIN;
7541 afcset[FC_NOASCII] = TC_1LATIN;
7542 afcset[FC_POASCII] = TC_1LATIN;
7543 afcset[FC_SPASCII] = TC_1LATIN;
7544 afcset[FC_SWASCII] = TC_1LATIN;
7545 afcset[FC_CHASCII] = TC_1LATIN;
7546 afcset[FC_1LATIN] = TC_1LATIN;
7547 afcset[FC_2LATIN] = TC_2LATIN;
7548 afcset[FC_DECMCS] = TC_1LATIN;
7549 afcset[FC_NEXT] = TC_1LATIN;
7550 afcset[FC_CP437] = TC_1LATIN;
7551 afcset[FC_CP850] = TC_1LATIN;
7552 afcset[FC_CP852] = TC_2LATIN;
7553 afcset[FC_APPQD] = TC_1LATIN;
7554 afcset[FC_DGMCS] = TC_1LATIN;
7555 afcset[FC_HPR8] = TC_1LATIN;
7556 afcset[FC_CYRILL] = TC_CYRILL;
7557 afcset[FC_CP866] = TC_CYRILL;
7558 afcset[FC_KOI7] = TC_CYRILL;
7559 afcset[FC_KOI8] = TC_CYRILL;
7560 afcset[FC_JIS7] = TC_JEUC;
7561 afcset[FC_SHJIS] = TC_JEUC;
7562 afcset[FC_JEUC] = TC_JEUC;
7563 afcset[FC_JDEC] = TC_JEUC;
7564 afcset[FC_HE7] = TC_HEBREW;
7565 afcset[FC_HEBREW] = TC_HEBREW;
7566 afcset[FC_CP862] = TC_HEBREW;
7567 afcset[FC_ELOT] = TC_GREEK;
7568 afcset[FC_GREEK] = TC_GREEK;
7569 afcset[FC_CP869] = TC_GREEK;
7570 afcset[FC_9LATIN] = TC_9LATIN;
7571 afcset[FC_CP923] = TC_9LATIN;
7572 afcset[FC_CP858] = TC_9LATIN;
7573 afcset[FC_CP855] = TC_CYRILL;
7574 afcset[FC_CP1251] = TC_CYRILL;
7575 afcset[FC_BULGAR] = TC_CYRILL;
7576 afcset[FC_CP1250] = TC_2LATIN;
7577 afcset[FC_MAZOVIA] = TC_2LATIN;
7578 afcset[FC_UCS2] = TC_UTF8;
7579 afcset[FC_UTF8] = TC_UTF8;
7581 afcset[FC_KOI8R] = TC_CYRILL;
7582 afcset[FC_KOI8U] = TC_CYRILL;
7583 afcset[FC_CP1252] = TC_1LATIN;
7588 #endif /* NOCSETS */