Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / extensions / spellcheck / hunspell / src / csutil.cpp
blob33b5f6d70f72f3de81d4e65b629771c408dd7e03
1 /******* BEGIN LICENSE BLOCK *******
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3 *
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
8 *
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
14 * The Initial Developers of the Original Code are Kevin Hendricks (MySpell)
15 * and László Németh (Hunspell). Portions created by the Initial Developers
16 * are Copyright (C) 2002-2005 the Initial Developers. All Rights Reserved.
18 * Contributor(s): Kevin Hendricks (kevin.hendricks@sympatico.ca)
19 * David Einstein (deinst@world.std.com)
20 * László Németh (nemethl@gyorsposta.hu)
21 * Davide Prina
22 * Giuseppe Modugno
23 * Gianluca Turconi
24 * Simon Brouwer
25 * Noll Janos
26 * Biro Arpad
27 * Goldman Eleonora
28 * Sarlos Tamas
29 * Bencsath Boldizsar
30 * Halacsy Peter
31 * Dvornik Laszlo
32 * Gefferth Andras
33 * Nagy Viktor
34 * Varga Daniel
35 * Chris Halls
36 * Rene Engelhard
37 * Bram Moolenaar
38 * Dafydd Jones
39 * Harri Pitkanen
40 * Andras Timar
41 * Tor Lillqvist
43 * Alternatively, the contents of this file may be used under the terms of
44 * either the GNU General Public License Version 2 or later (the "GPL"), or
45 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
46 * in which case the provisions of the GPL or the LGPL are applicable instead
47 * of those above. If you wish to allow use of your version of this file only
48 * under the terms of either the GPL or the LGPL, and not to allow others to
49 * use your version of this file under the terms of the MPL, indicate your
50 * decision by deleting the provisions above and replace them with the notice
51 * and other provisions required by the GPL or the LGPL. If you do not delete
52 * the provisions above, a recipient may use your version of this file under
53 * the terms of any one of the MPL, the GPL or the LGPL.
55 ******* END LICENSE BLOCK *******/
57 #ifndef MOZILLA_CLIENT
58 #include <cstdlib>
59 #include <cstring>
60 #include <cstdio>
61 #include <cctype>
62 #else
63 #include <stdlib.h>
64 #include <string.h>
65 #include <stdio.h>
66 #include <ctype.h>
67 #endif
69 #include "atypes.hxx"
70 #include "csutil.hxx"
71 #include "langnum.hxx"
73 #ifdef OPENOFFICEORG
74 # include <unicode/uchar.h>
75 #else
76 # ifndef MOZILLA_CLIENT
77 # include "utf_info.cxx"
78 # define UTF_LST_LEN (sizeof(utf_lst) / (sizeof(unicode_info)))
79 # endif
80 #endif
82 #ifdef MOZILLA_CLIENT
83 #include "nsCOMPtr.h"
84 #include "nsServiceManagerUtils.h"
85 #include "nsIUnicodeEncoder.h"
86 #include "nsIUnicodeDecoder.h"
87 #include "nsICaseConversion.h"
88 #include "nsICharsetConverterManager.h"
89 #include "nsUnicharUtilCIID.h"
90 #include "nsUnicharUtils.h"
92 static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
93 static NS_DEFINE_CID(kUnicharUtilCID, NS_UNICHARUTIL_CID);
94 #endif
96 #ifdef MOZILLA_CLIENT
97 #ifdef __SUNPRO_CC // for SunONE Studio compiler
98 using namespace std;
99 #endif
100 #else
101 #ifndef W32
102 using namespace std;
103 #endif
104 #endif
106 static struct unicode_info2 * utf_tbl = NULL;
107 static int utf_tbl_count = 0; // utf_tbl can be used by multiple Hunspell instances
109 /* only UTF-16 (BMP) implementation */
110 char * u16_u8(char * dest, int size, const w_char * src, int srclen) {
111 signed char * u8 = (signed char *)dest;
112 signed char * u8_max = (signed char *)(u8 + size);
113 const w_char * u2 = src;
114 const w_char * u2_max = src + srclen;
115 while ((u2 < u2_max) && (u8 < u8_max)) {
116 if (u2->h) { // > 0xFF
117 // XXX 4-byte haven't implemented yet.
118 if (u2->h >= 0x08) { // >= 0x800 (3-byte UTF-8 character)
119 *u8 = 0xe0 + (u2->h >> 4);
120 u8++;
121 if (u8 < u8_max) {
122 *u8 = 0x80 + ((u2->h & 0xf) << 2) + (u2->l >> 6);
123 u8++;
124 if (u8 < u8_max) {
125 *u8 = 0x80 + (u2->l & 0x3f);
126 u8++;
129 } else { // < 0x800 (2-byte UTF-8 character)
130 *u8 = 0xc0 + (u2->h << 2) + (u2->l >> 6);
131 u8++;
132 if (u8 < u8_max) {
133 *u8 = 0x80 + (u2->l & 0x3f);
134 u8++;
137 } else { // <= 0xFF
138 if (u2->l & 0x80) { // >0x80 (2-byte UTF-8 character)
139 *u8 = 0xc0 + (u2->l >> 6);
140 u8++;
141 if (u8 < u8_max) {
142 *u8 = 0x80 + (u2->l & 0x3f);
143 u8++;
145 } else { // < 0x80 (1-byte UTF-8 character)
146 *u8 = u2->l;
147 u8++;
150 u2++;
152 *u8 = '\0';
153 return dest;
157 /* only UTF-16 (BMP) implementation */
158 int u8_u16(w_char * dest, int size, const char * src) {
159 const signed char * u8 = (const signed char *)src;
160 w_char * u2 = dest;
161 w_char * u2_max = u2 + size;
163 while ((u2 < u2_max) && *u8) {
164 switch ((*u8) & 0xf0) {
165 case 0x00:
166 case 0x10:
167 case 0x20:
168 case 0x30:
169 case 0x40:
170 case 0x50:
171 case 0x60:
172 case 0x70: {
173 u2->h = 0;
174 u2->l = *u8;
175 break;
177 case 0x80:
178 case 0x90:
179 case 0xa0:
180 case 0xb0: {
181 HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Unexpected continuation bytes in %ld. character position\n%s\n", static_cast<long>(u8 - (signed char *)src), src);
182 u2->h = 0xff;
183 u2->l = 0xfd;
184 break;
186 case 0xc0:
187 case 0xd0: { // 2-byte UTF-8 codes
188 if ((*(u8+1) & 0xc0) == 0x80) {
189 u2->h = (*u8 & 0x1f) >> 2;
190 u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
191 u8++;
192 } else {
193 HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed char *)src), src);
194 u2->h = 0xff;
195 u2->l = 0xfd;
197 break;
199 case 0xe0: { // 3-byte UTF-8 codes
200 if ((*(u8+1) & 0xc0) == 0x80) {
201 u2->h = ((*u8 & 0x0f) << 4) + ((*(u8+1) & 0x3f) >> 2);
202 u8++;
203 if ((*(u8+1) & 0xc0) == 0x80) {
204 u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
205 u8++;
206 } else {
207 HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed char *)src), src);
208 u2->h = 0xff;
209 u2->l = 0xfd;
211 } else {
212 HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed char *)src), src);
213 u2->h = 0xff;
214 u2->l = 0xfd;
216 break;
218 case 0xf0: { // 4 or more byte UTF-8 codes
219 HUNSPELL_WARNING(stderr, "This UTF-8 encoding can't convert to UTF-16:\n%s\n", src);
220 u2->h = 0xff;
221 u2->l = 0xfd;
222 return -1;
225 u8++;
226 u2++;
228 return u2 - dest;
231 void flag_qsort(unsigned short flags[], int begin, int end) {
232 unsigned short reg;
233 if (end > begin) {
234 unsigned short pivot = flags[begin];
235 int l = begin + 1;
236 int r = end;
237 while(l < r) {
238 if (flags[l] <= pivot) {
239 l++;
240 } else {
241 r--;
242 reg = flags[l];
243 flags[l] = flags[r];
244 flags[r] = reg;
247 l--;
248 reg = flags[begin];
249 flags[begin] = flags[l];
250 flags[l] = reg;
252 flag_qsort(flags, begin, l);
253 flag_qsort(flags, r, end);
257 int flag_bsearch(unsigned short flags[], unsigned short flag, int length) {
258 int mid;
259 int left = 0;
260 int right = length - 1;
261 while (left <= right) {
262 mid = (left + right) / 2;
263 if (flags[mid] == flag) return 1;
264 if (flag < flags[mid]) right = mid - 1;
265 else left = mid + 1;
267 return 0;
270 // strip strings into token based on single char delimiter
271 // acts like strsep() but only uses a delim char and not
272 // a delim string
273 // default delimiter: white space characters
275 char * mystrsep(char ** stringp, const char delim)
277 char * mp = *stringp;
278 if (*mp != '\0') {
279 char * dp;
280 if (delim) {
281 dp = strchr(mp, delim);
282 } else {
283 // don't use isspace() here, the string can be in some random charset
284 // that's way different than the locale's
285 for (dp = mp; (*dp && *dp != ' ' && *dp != '\t'); dp++);
286 if (!*dp) dp = NULL;
288 if (dp) {
289 *stringp = dp+1;
290 int nc = (int)((unsigned long)dp - (unsigned long)mp);
291 *(mp+nc) = '\0';
292 return mp;
293 } else {
294 *stringp = mp + strlen(mp);
295 return mp;
298 return NULL;
301 // replaces strdup with ansi version
302 char * mystrdup(const char * s)
304 char * d = NULL;
305 if (s) {
306 int sl = strlen(s);
307 d = (char *) malloc(((sl+1) * sizeof(char)));
308 if (d) {
309 memcpy(d,s,((sl+1)*sizeof(char)));
310 return d;
312 HUNSPELL_WARNING(stderr, "Can't allocate memory.\n");
314 return d;
317 // strcat for limited length destination string
318 char * mystrcat(char * dest, const char * st, int max) {
319 int len;
320 int len2;
321 if (dest == NULL || st == NULL) return dest;
322 len = strlen(dest);
323 len2 = strlen(st);
324 if (len + len2 + 1 > max) return dest;
325 strcpy(dest + len, st);
326 return dest;
329 // remove cross-platform text line end characters
330 void mychomp(char * s)
332 int k = strlen(s);
333 if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0';
334 if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0';
338 // does an ansi strdup of the reverse of a string
339 char * myrevstrdup(const char * s)
341 char * d = NULL;
342 if (s) {
343 int sl = strlen(s);
344 d = (char *) malloc((sl+1) * sizeof(char));
345 if (d) {
346 const char * p = s + sl - 1;
347 char * q = d;
348 while (p >= s) *q++ = *p--;
349 *q = '\0';
352 return d;
355 // break text to lines
356 // return number of lines
357 int line_tok(const char * text, char *** lines, char breakchar) {
358 int linenum = 0;
359 char * dup = mystrdup(text);
360 char * p = strchr(dup, breakchar);
361 while (p) {
362 linenum++;
363 *p = '\0';
364 p++;
365 p = strchr(p, breakchar);
367 linenum++;
368 // fprintf(stderr, "LINEN:%d %p %p\n", linenum, lines, *lines);
369 *lines = (char **) malloc(linenum * sizeof(char *));
370 // fprintf(stderr, "hello\n");
371 if (!(*lines)) {
372 free(dup);
373 return 0;
376 p = dup;
377 int l = 0;
378 for (int i = 0; i < linenum; i++) {
379 if (*p != '\0') {
380 (*lines)[l] = mystrdup(p);
381 if (!(*lines)[l]) {
382 for (i = 0; i < l; i++) free((*lines)[i]);
383 free(dup);
384 return 0;
386 l++;
388 p += strlen(p) + 1;
390 free(dup);
391 if (!l) free(*lines);
392 return l;
395 // uniq line in place
396 char * line_uniq(char * text, char breakchar) {
397 char ** lines;
398 int linenum = line_tok(text, &lines, breakchar);
399 int i;
400 strcpy(text, lines[0]);
401 for ( i = 1; i < linenum; i++ ) {
402 int dup = 0;
403 for (int j = 0; j < i; j++) {
404 if (strcmp(lines[i], lines[j]) == 0) dup = 1;
406 if (!dup) {
407 if ((i > 1) || (*(lines[0]) != '\0')) {
408 sprintf(text + strlen(text), "%c", breakchar);
410 strcat(text, lines[i]);
413 for ( i = 0; i < linenum; i++ ) {
414 if (lines[i]) free(lines[i]);
416 if (lines) free(lines);
417 return text;
420 // uniq and boundary for compound analysis: "1\n\2\n\1" -> " ( \1 | \2 ) "
421 char * line_uniq_app(char ** text, char breakchar) {
422 if (!strchr(*text, breakchar)) {
423 return *text;
426 char ** lines;
427 int i;
428 int linenum = line_tok(*text, &lines, breakchar);
429 int dup = 0;
430 for (i = 0; i < linenum; i++) {
431 for (int j = 0; j < (i - 1); j++) {
432 if (strcmp(lines[i], lines[j]) == 0) {
433 *(lines[i]) = '\0';
434 dup++;
435 break;
439 if ((linenum - dup) == 1) {
440 strcpy(*text, lines[0]);
441 freelist(&lines, linenum);
442 return *text;
444 char * newtext = (char *) malloc(strlen(*text) + 2 * linenum + 3 + 1);
445 if (newtext) {
446 free(*text);
447 *text = newtext;
448 } else {
449 freelist(&lines, linenum);
450 return *text;
452 strcpy(*text," ( ");
453 for (i = 0; i < linenum; i++) if (*(lines[i])) {
454 sprintf(*text + strlen(*text), "%s%s", lines[i], " | ");
456 (*text)[strlen(*text) - 2] = ')'; // " ) "
457 freelist(&lines, linenum);
458 return *text;
461 // append s to ends of every lines in text
462 void strlinecat(char * dest, const char * s)
464 char * dup = mystrdup(dest);
465 char * source = dup;
466 int len = strlen(s);
467 if (dup) {
468 while (*source) {
469 if (*source == '\n') {
470 strncpy(dest, s, len);
471 dest += len;
473 *dest = *source;
474 source++; dest++;
476 strcpy(dest, s);
477 free(dup);
481 // change \n to char c
482 char * tr(char * text, char oldc, char newc) {
483 char * p;
484 for (p = text; *p; p++) if (*p == oldc) *p = newc;
485 return text;
488 // morphcmp(): compare MORPH_DERI_SFX, MORPH_INFL_SFX and MORPH_TERM_SFX fields
489 // in the first line of the inputs
490 // return 0, if inputs equal
491 // return 1, if inputs may equal with a secondary suffix
492 // otherwise return -1
493 int morphcmp(const char * s, const char * t)
495 int se = 0;
496 int te = 0;
497 const char * sl;
498 const char * tl;
499 const char * olds;
500 const char * oldt;
501 if (!s || !t) return 1;
502 olds = s;
503 sl = strchr(s, '\n');
504 s = strstr(s, MORPH_DERI_SFX);
505 if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX);
506 if (!s || (sl && sl < s)) {
507 s= strstr(olds, MORPH_TERM_SFX);
508 olds = NULL;
510 oldt = t;
511 tl = strchr(t, '\n');
512 t = strstr(t, MORPH_DERI_SFX);
513 if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX);
514 if (!t || (tl && tl < t)) {
515 t = strstr(oldt, MORPH_TERM_SFX);
516 oldt = NULL;
518 while (s && t && (!sl || sl > s) && (!tl || tl > t)) {
519 s += MORPH_TAG_LEN;
520 t += MORPH_TAG_LEN;
521 se = 0;
522 te = 0;
523 while ((*s == *t) && !se && !te) {
524 s++;
525 t++;
526 switch(*s) {
527 case ' ':
528 case '\n':
529 case '\t':
530 case '\0': se = 1;
532 switch(*t) {
533 case ' ':
534 case '\n':
535 case '\t':
536 case '\0': te = 1;
539 if (!se || !te) {
540 // not terminal suffix difference
541 if (olds) return -1;
542 return 1;
544 olds = s;
545 s = strstr(s, MORPH_DERI_SFX);
546 if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX);
547 if (!s || (sl && sl < s)) {
548 s = strstr(olds, MORPH_TERM_SFX);
549 olds = NULL;
551 oldt = t;
552 t = strstr(t, MORPH_DERI_SFX);
553 if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX);
554 if (!t || (tl && tl < t)) {
555 t = strstr(oldt, MORPH_TERM_SFX);
556 oldt = NULL;
559 if (!s && !t && se && te) return 0;
560 return 1;
563 int get_sfxcount(const char * morph)
565 if (!morph || !*morph) return 0;
566 int n = 0;
567 const char * old = morph;
568 morph = strstr(morph, MORPH_DERI_SFX);
569 if (!morph) morph = strstr(old, MORPH_INFL_SFX);
570 if (!morph) morph = strstr(old, MORPH_TERM_SFX);
571 while (morph) {
572 n++;
573 old = morph;
574 morph = strstr(morph + 1, MORPH_DERI_SFX);
575 if (!morph) morph = strstr(old + 1, MORPH_INFL_SFX);
576 if (!morph) morph = strstr(old + 1, MORPH_TERM_SFX);
578 return n;
582 int fieldlen(const char * r)
584 int n = 0;
585 while (r && *r != '\t' && *r != '\0' && *r != '\n' && *r != ' ') {
586 r++;
587 n++;
589 return n;
592 char * copy_field(char * dest, const char * morph, const char * var)
594 if (!morph) return NULL;
595 const char * beg = strstr(morph, var);
596 if (beg) {
597 char * d = dest;
598 for (beg += MORPH_TAG_LEN; *beg != ' ' && *beg != '\t' &&
599 *beg != '\n' && *beg != '\0'; d++, beg++) {
600 *d = *beg;
602 *d = '\0';
603 return dest;
605 return NULL;
608 char * mystrrep(char * word, const char * pat, const char * rep) {
609 char * pos = strstr(word, pat);
610 if (pos) {
611 int replen = strlen(rep);
612 int patlen = strlen(pat);
613 if (replen < patlen) {
614 char * end = word + strlen(word);
615 char * next = pos + replen;
616 char * prev = pos + strlen(pat);
617 for (; prev < end; *next = *prev, prev++, next++);
618 *next = '\0';
619 } else if (replen > patlen) {
620 char * end = pos + patlen;
621 char * next = word + strlen(word) + replen - patlen;
622 char * prev = next - replen + patlen;
623 for (; prev >= end; *next = *prev, prev--, next--);
625 strncpy(pos, rep, replen);
627 return word;
630 // reverse word
631 int reverseword(char * word) {
632 char r;
633 for (char * dest = word + strlen(word) - 1; word < dest; word++, dest--) {
634 r=*word;
635 *word = *dest;
636 *dest = r;
638 return 0;
641 // reverse word (error: 1)
642 int reverseword_utf(char * word) {
643 w_char w[MAXWORDLEN];
644 w_char * p;
645 w_char r;
646 int l = u8_u16(w, MAXWORDLEN, word);
647 if (l == -1) return 1;
648 p = w;
649 for (w_char * dest = w + l - 1; p < dest; p++, dest--) {
650 r=*p;
651 *p = *dest;
652 *dest = r;
654 u16_u8(word, MAXWORDUTF8LEN, w, l);
655 return 0;
658 int uniqlist(char ** list, int n) {
659 int i;
660 if (n < 2) return n;
661 for (i = 0; i < n; i++) {
662 for (int j = 0; j < i; j++) {
663 if (list[j] && list[i] && (strcmp(list[j], list[i]) == 0)) {
664 free(list[i]);
665 list[i] = NULL;
666 break;
670 int m = 1;
671 for (i = 1; i < n; i++) if (list[i]) {
672 list[m] = list[i];
673 m++;
675 return m;
678 void freelist(char *** list, int n) {
679 if (list && *list && n > 0) {
680 for (int i = 0; i < n; i++) if ((*list)[i]) free((*list)[i]);
681 free(*list);
682 *list = NULL;
686 // convert null terminated string to all caps
687 void mkallcap(char * p, const struct cs_info * csconv)
689 while (*p != '\0') {
690 *p = csconv[((unsigned char) *p)].cupper;
691 p++;
695 // convert null terminated string to all little
696 void mkallsmall(char * p, const struct cs_info * csconv)
698 while (*p != '\0') {
699 *p = csconv[((unsigned char) *p)].clower;
700 p++;
704 void mkallsmall_utf(w_char * u, int nc, int langnum) {
705 for (int i = 0; i < nc; i++) {
706 unsigned short idx = (u[i].h << 8) + u[i].l;
707 if (idx != unicodetolower(idx, langnum)) {
708 u[i].h = (unsigned char) (unicodetolower(idx, langnum) >> 8);
709 u[i].l = (unsigned char) (unicodetolower(idx, langnum) & 0x00FF);
714 void mkallcap_utf(w_char * u, int nc, int langnum) {
715 for (int i = 0; i < nc; i++) {
716 unsigned short idx = (u[i].h << 8) + u[i].l;
717 if (idx != unicodetoupper(idx, langnum)) {
718 u[i].h = (unsigned char) (unicodetoupper(idx, langnum) >> 8);
719 u[i].l = (unsigned char) (unicodetoupper(idx, langnum) & 0x00FF);
724 // convert null terminated string to have intial capital
725 void mkinitcap(char * p, const struct cs_info * csconv)
727 if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper;
730 // conversion function for protected memory
731 void store_pointer(char * dest, char * source)
733 memcpy(dest, &source, sizeof(char *));
736 // conversion function for protected memory
737 char * get_stored_pointer(char * s)
739 char * p;
740 memcpy(&p, s, sizeof(char *));
741 return p;
744 #ifndef MOZILLA_CLIENT
745 // convert null terminated string to all caps using encoding
746 void enmkallcap(char * d, const char * p, const char * encoding)
749 struct cs_info * csconv = get_current_cs(encoding);
750 while (*p != '\0') {
751 *d++ = csconv[((unsigned char) *p)].cupper;
752 p++;
754 *d = '\0';
757 // convert null terminated string to all little using encoding
758 void enmkallsmall(char * d, const char * p, const char * encoding)
760 struct cs_info * csconv = get_current_cs(encoding);
761 while (*p != '\0') {
762 *d++ = csconv[((unsigned char) *p)].clower;
763 p++;
765 *d = '\0';
768 // convert null terminated string to have intial capital using encoding
769 void enmkinitcap(char * d, const char * p, const char * encoding)
771 struct cs_info * csconv = get_current_cs(encoding);
772 memcpy(d,p,(strlen(p)+1));
773 if (*p != '\0') *d= csconv[((unsigned char)*p)].cupper;
776 // these are simple character mappings for the
777 // encodings supported
778 // supplying isupper, tolower, and toupper
780 struct cs_info iso1_tbl[] = {
781 { 0x00, 0x00, 0x00 },
782 { 0x00, 0x01, 0x01 },
783 { 0x00, 0x02, 0x02 },
784 { 0x00, 0x03, 0x03 },
785 { 0x00, 0x04, 0x04 },
786 { 0x00, 0x05, 0x05 },
787 { 0x00, 0x06, 0x06 },
788 { 0x00, 0x07, 0x07 },
789 { 0x00, 0x08, 0x08 },
790 { 0x00, 0x09, 0x09 },
791 { 0x00, 0x0a, 0x0a },
792 { 0x00, 0x0b, 0x0b },
793 { 0x00, 0x0c, 0x0c },
794 { 0x00, 0x0d, 0x0d },
795 { 0x00, 0x0e, 0x0e },
796 { 0x00, 0x0f, 0x0f },
797 { 0x00, 0x10, 0x10 },
798 { 0x00, 0x11, 0x11 },
799 { 0x00, 0x12, 0x12 },
800 { 0x00, 0x13, 0x13 },
801 { 0x00, 0x14, 0x14 },
802 { 0x00, 0x15, 0x15 },
803 { 0x00, 0x16, 0x16 },
804 { 0x00, 0x17, 0x17 },
805 { 0x00, 0x18, 0x18 },
806 { 0x00, 0x19, 0x19 },
807 { 0x00, 0x1a, 0x1a },
808 { 0x00, 0x1b, 0x1b },
809 { 0x00, 0x1c, 0x1c },
810 { 0x00, 0x1d, 0x1d },
811 { 0x00, 0x1e, 0x1e },
812 { 0x00, 0x1f, 0x1f },
813 { 0x00, 0x20, 0x20 },
814 { 0x00, 0x21, 0x21 },
815 { 0x00, 0x22, 0x22 },
816 { 0x00, 0x23, 0x23 },
817 { 0x00, 0x24, 0x24 },
818 { 0x00, 0x25, 0x25 },
819 { 0x00, 0x26, 0x26 },
820 { 0x00, 0x27, 0x27 },
821 { 0x00, 0x28, 0x28 },
822 { 0x00, 0x29, 0x29 },
823 { 0x00, 0x2a, 0x2a },
824 { 0x00, 0x2b, 0x2b },
825 { 0x00, 0x2c, 0x2c },
826 { 0x00, 0x2d, 0x2d },
827 { 0x00, 0x2e, 0x2e },
828 { 0x00, 0x2f, 0x2f },
829 { 0x00, 0x30, 0x30 },
830 { 0x00, 0x31, 0x31 },
831 { 0x00, 0x32, 0x32 },
832 { 0x00, 0x33, 0x33 },
833 { 0x00, 0x34, 0x34 },
834 { 0x00, 0x35, 0x35 },
835 { 0x00, 0x36, 0x36 },
836 { 0x00, 0x37, 0x37 },
837 { 0x00, 0x38, 0x38 },
838 { 0x00, 0x39, 0x39 },
839 { 0x00, 0x3a, 0x3a },
840 { 0x00, 0x3b, 0x3b },
841 { 0x00, 0x3c, 0x3c },
842 { 0x00, 0x3d, 0x3d },
843 { 0x00, 0x3e, 0x3e },
844 { 0x00, 0x3f, 0x3f },
845 { 0x00, 0x40, 0x40 },
846 { 0x01, 0x61, 0x41 },
847 { 0x01, 0x62, 0x42 },
848 { 0x01, 0x63, 0x43 },
849 { 0x01, 0x64, 0x44 },
850 { 0x01, 0x65, 0x45 },
851 { 0x01, 0x66, 0x46 },
852 { 0x01, 0x67, 0x47 },
853 { 0x01, 0x68, 0x48 },
854 { 0x01, 0x69, 0x49 },
855 { 0x01, 0x6a, 0x4a },
856 { 0x01, 0x6b, 0x4b },
857 { 0x01, 0x6c, 0x4c },
858 { 0x01, 0x6d, 0x4d },
859 { 0x01, 0x6e, 0x4e },
860 { 0x01, 0x6f, 0x4f },
861 { 0x01, 0x70, 0x50 },
862 { 0x01, 0x71, 0x51 },
863 { 0x01, 0x72, 0x52 },
864 { 0x01, 0x73, 0x53 },
865 { 0x01, 0x74, 0x54 },
866 { 0x01, 0x75, 0x55 },
867 { 0x01, 0x76, 0x56 },
868 { 0x01, 0x77, 0x57 },
869 { 0x01, 0x78, 0x58 },
870 { 0x01, 0x79, 0x59 },
871 { 0x01, 0x7a, 0x5a },
872 { 0x00, 0x5b, 0x5b },
873 { 0x00, 0x5c, 0x5c },
874 { 0x00, 0x5d, 0x5d },
875 { 0x00, 0x5e, 0x5e },
876 { 0x00, 0x5f, 0x5f },
877 { 0x00, 0x60, 0x60 },
878 { 0x00, 0x61, 0x41 },
879 { 0x00, 0x62, 0x42 },
880 { 0x00, 0x63, 0x43 },
881 { 0x00, 0x64, 0x44 },
882 { 0x00, 0x65, 0x45 },
883 { 0x00, 0x66, 0x46 },
884 { 0x00, 0x67, 0x47 },
885 { 0x00, 0x68, 0x48 },
886 { 0x00, 0x69, 0x49 },
887 { 0x00, 0x6a, 0x4a },
888 { 0x00, 0x6b, 0x4b },
889 { 0x00, 0x6c, 0x4c },
890 { 0x00, 0x6d, 0x4d },
891 { 0x00, 0x6e, 0x4e },
892 { 0x00, 0x6f, 0x4f },
893 { 0x00, 0x70, 0x50 },
894 { 0x00, 0x71, 0x51 },
895 { 0x00, 0x72, 0x52 },
896 { 0x00, 0x73, 0x53 },
897 { 0x00, 0x74, 0x54 },
898 { 0x00, 0x75, 0x55 },
899 { 0x00, 0x76, 0x56 },
900 { 0x00, 0x77, 0x57 },
901 { 0x00, 0x78, 0x58 },
902 { 0x00, 0x79, 0x59 },
903 { 0x00, 0x7a, 0x5a },
904 { 0x00, 0x7b, 0x7b },
905 { 0x00, 0x7c, 0x7c },
906 { 0x00, 0x7d, 0x7d },
907 { 0x00, 0x7e, 0x7e },
908 { 0x00, 0x7f, 0x7f },
909 { 0x00, 0x80, 0x80 },
910 { 0x00, 0x81, 0x81 },
911 { 0x00, 0x82, 0x82 },
912 { 0x00, 0x83, 0x83 },
913 { 0x00, 0x84, 0x84 },
914 { 0x00, 0x85, 0x85 },
915 { 0x00, 0x86, 0x86 },
916 { 0x00, 0x87, 0x87 },
917 { 0x00, 0x88, 0x88 },
918 { 0x00, 0x89, 0x89 },
919 { 0x00, 0x8a, 0x8a },
920 { 0x00, 0x8b, 0x8b },
921 { 0x00, 0x8c, 0x8c },
922 { 0x00, 0x8d, 0x8d },
923 { 0x00, 0x8e, 0x8e },
924 { 0x00, 0x8f, 0x8f },
925 { 0x00, 0x90, 0x90 },
926 { 0x00, 0x91, 0x91 },
927 { 0x00, 0x92, 0x92 },
928 { 0x00, 0x93, 0x93 },
929 { 0x00, 0x94, 0x94 },
930 { 0x00, 0x95, 0x95 },
931 { 0x00, 0x96, 0x96 },
932 { 0x00, 0x97, 0x97 },
933 { 0x00, 0x98, 0x98 },
934 { 0x00, 0x99, 0x99 },
935 { 0x00, 0x9a, 0x9a },
936 { 0x00, 0x9b, 0x9b },
937 { 0x00, 0x9c, 0x9c },
938 { 0x00, 0x9d, 0x9d },
939 { 0x00, 0x9e, 0x9e },
940 { 0x00, 0x9f, 0x9f },
941 { 0x00, 0xa0, 0xa0 },
942 { 0x00, 0xa1, 0xa1 },
943 { 0x00, 0xa2, 0xa2 },
944 { 0x00, 0xa3, 0xa3 },
945 { 0x00, 0xa4, 0xa4 },
946 { 0x00, 0xa5, 0xa5 },
947 { 0x00, 0xa6, 0xa6 },
948 { 0x00, 0xa7, 0xa7 },
949 { 0x00, 0xa8, 0xa8 },
950 { 0x00, 0xa9, 0xa9 },
951 { 0x00, 0xaa, 0xaa },
952 { 0x00, 0xab, 0xab },
953 { 0x00, 0xac, 0xac },
954 { 0x00, 0xad, 0xad },
955 { 0x00, 0xae, 0xae },
956 { 0x00, 0xaf, 0xaf },
957 { 0x00, 0xb0, 0xb0 },
958 { 0x00, 0xb1, 0xb1 },
959 { 0x00, 0xb2, 0xb2 },
960 { 0x00, 0xb3, 0xb3 },
961 { 0x00, 0xb4, 0xb4 },
962 { 0x00, 0xb5, 0xb5 },
963 { 0x00, 0xb6, 0xb6 },
964 { 0x00, 0xb7, 0xb7 },
965 { 0x00, 0xb8, 0xb8 },
966 { 0x00, 0xb9, 0xb9 },
967 { 0x00, 0xba, 0xba },
968 { 0x00, 0xbb, 0xbb },
969 { 0x00, 0xbc, 0xbc },
970 { 0x00, 0xbd, 0xbd },
971 { 0x00, 0xbe, 0xbe },
972 { 0x00, 0xbf, 0xbf },
973 { 0x01, 0xe0, 0xc0 },
974 { 0x01, 0xe1, 0xc1 },
975 { 0x01, 0xe2, 0xc2 },
976 { 0x01, 0xe3, 0xc3 },
977 { 0x01, 0xe4, 0xc4 },
978 { 0x01, 0xe5, 0xc5 },
979 { 0x01, 0xe6, 0xc6 },
980 { 0x01, 0xe7, 0xc7 },
981 { 0x01, 0xe8, 0xc8 },
982 { 0x01, 0xe9, 0xc9 },
983 { 0x01, 0xea, 0xca },
984 { 0x01, 0xeb, 0xcb },
985 { 0x01, 0xec, 0xcc },
986 { 0x01, 0xed, 0xcd },
987 { 0x01, 0xee, 0xce },
988 { 0x01, 0xef, 0xcf },
989 { 0x01, 0xf0, 0xd0 },
990 { 0x01, 0xf1, 0xd1 },
991 { 0x01, 0xf2, 0xd2 },
992 { 0x01, 0xf3, 0xd3 },
993 { 0x01, 0xf4, 0xd4 },
994 { 0x01, 0xf5, 0xd5 },
995 { 0x01, 0xf6, 0xd6 },
996 { 0x00, 0xd7, 0xd7 },
997 { 0x01, 0xf8, 0xd8 },
998 { 0x01, 0xf9, 0xd9 },
999 { 0x01, 0xfa, 0xda },
1000 { 0x01, 0xfb, 0xdb },
1001 { 0x01, 0xfc, 0xdc },
1002 { 0x01, 0xfd, 0xdd },
1003 { 0x01, 0xfe, 0xde },
1004 { 0x00, 0xdf, 0xdf },
1005 { 0x00, 0xe0, 0xc0 },
1006 { 0x00, 0xe1, 0xc1 },
1007 { 0x00, 0xe2, 0xc2 },
1008 { 0x00, 0xe3, 0xc3 },
1009 { 0x00, 0xe4, 0xc4 },
1010 { 0x00, 0xe5, 0xc5 },
1011 { 0x00, 0xe6, 0xc6 },
1012 { 0x00, 0xe7, 0xc7 },
1013 { 0x00, 0xe8, 0xc8 },
1014 { 0x00, 0xe9, 0xc9 },
1015 { 0x00, 0xea, 0xca },
1016 { 0x00, 0xeb, 0xcb },
1017 { 0x00, 0xec, 0xcc },
1018 { 0x00, 0xed, 0xcd },
1019 { 0x00, 0xee, 0xce },
1020 { 0x00, 0xef, 0xcf },
1021 { 0x00, 0xf0, 0xd0 },
1022 { 0x00, 0xf1, 0xd1 },
1023 { 0x00, 0xf2, 0xd2 },
1024 { 0x00, 0xf3, 0xd3 },
1025 { 0x00, 0xf4, 0xd4 },
1026 { 0x00, 0xf5, 0xd5 },
1027 { 0x00, 0xf6, 0xd6 },
1028 { 0x00, 0xf7, 0xf7 },
1029 { 0x00, 0xf8, 0xd8 },
1030 { 0x00, 0xf9, 0xd9 },
1031 { 0x00, 0xfa, 0xda },
1032 { 0x00, 0xfb, 0xdb },
1033 { 0x00, 0xfc, 0xdc },
1034 { 0x00, 0xfd, 0xdd },
1035 { 0x00, 0xfe, 0xde },
1036 { 0x00, 0xff, 0xff }
1040 struct cs_info iso2_tbl[] = {
1041 { 0x00, 0x00, 0x00 },
1042 { 0x00, 0x01, 0x01 },
1043 { 0x00, 0x02, 0x02 },
1044 { 0x00, 0x03, 0x03 },
1045 { 0x00, 0x04, 0x04 },
1046 { 0x00, 0x05, 0x05 },
1047 { 0x00, 0x06, 0x06 },
1048 { 0x00, 0x07, 0x07 },
1049 { 0x00, 0x08, 0x08 },
1050 { 0x00, 0x09, 0x09 },
1051 { 0x00, 0x0a, 0x0a },
1052 { 0x00, 0x0b, 0x0b },
1053 { 0x00, 0x0c, 0x0c },
1054 { 0x00, 0x0d, 0x0d },
1055 { 0x00, 0x0e, 0x0e },
1056 { 0x00, 0x0f, 0x0f },
1057 { 0x00, 0x10, 0x10 },
1058 { 0x00, 0x11, 0x11 },
1059 { 0x00, 0x12, 0x12 },
1060 { 0x00, 0x13, 0x13 },
1061 { 0x00, 0x14, 0x14 },
1062 { 0x00, 0x15, 0x15 },
1063 { 0x00, 0x16, 0x16 },
1064 { 0x00, 0x17, 0x17 },
1065 { 0x00, 0x18, 0x18 },
1066 { 0x00, 0x19, 0x19 },
1067 { 0x00, 0x1a, 0x1a },
1068 { 0x00, 0x1b, 0x1b },
1069 { 0x00, 0x1c, 0x1c },
1070 { 0x00, 0x1d, 0x1d },
1071 { 0x00, 0x1e, 0x1e },
1072 { 0x00, 0x1f, 0x1f },
1073 { 0x00, 0x20, 0x20 },
1074 { 0x00, 0x21, 0x21 },
1075 { 0x00, 0x22, 0x22 },
1076 { 0x00, 0x23, 0x23 },
1077 { 0x00, 0x24, 0x24 },
1078 { 0x00, 0x25, 0x25 },
1079 { 0x00, 0x26, 0x26 },
1080 { 0x00, 0x27, 0x27 },
1081 { 0x00, 0x28, 0x28 },
1082 { 0x00, 0x29, 0x29 },
1083 { 0x00, 0x2a, 0x2a },
1084 { 0x00, 0x2b, 0x2b },
1085 { 0x00, 0x2c, 0x2c },
1086 { 0x00, 0x2d, 0x2d },
1087 { 0x00, 0x2e, 0x2e },
1088 { 0x00, 0x2f, 0x2f },
1089 { 0x00, 0x30, 0x30 },
1090 { 0x00, 0x31, 0x31 },
1091 { 0x00, 0x32, 0x32 },
1092 { 0x00, 0x33, 0x33 },
1093 { 0x00, 0x34, 0x34 },
1094 { 0x00, 0x35, 0x35 },
1095 { 0x00, 0x36, 0x36 },
1096 { 0x00, 0x37, 0x37 },
1097 { 0x00, 0x38, 0x38 },
1098 { 0x00, 0x39, 0x39 },
1099 { 0x00, 0x3a, 0x3a },
1100 { 0x00, 0x3b, 0x3b },
1101 { 0x00, 0x3c, 0x3c },
1102 { 0x00, 0x3d, 0x3d },
1103 { 0x00, 0x3e, 0x3e },
1104 { 0x00, 0x3f, 0x3f },
1105 { 0x00, 0x40, 0x40 },
1106 { 0x01, 0x61, 0x41 },
1107 { 0x01, 0x62, 0x42 },
1108 { 0x01, 0x63, 0x43 },
1109 { 0x01, 0x64, 0x44 },
1110 { 0x01, 0x65, 0x45 },
1111 { 0x01, 0x66, 0x46 },
1112 { 0x01, 0x67, 0x47 },
1113 { 0x01, 0x68, 0x48 },
1114 { 0x01, 0x69, 0x49 },
1115 { 0x01, 0x6a, 0x4a },
1116 { 0x01, 0x6b, 0x4b },
1117 { 0x01, 0x6c, 0x4c },
1118 { 0x01, 0x6d, 0x4d },
1119 { 0x01, 0x6e, 0x4e },
1120 { 0x01, 0x6f, 0x4f },
1121 { 0x01, 0x70, 0x50 },
1122 { 0x01, 0x71, 0x51 },
1123 { 0x01, 0x72, 0x52 },
1124 { 0x01, 0x73, 0x53 },
1125 { 0x01, 0x74, 0x54 },
1126 { 0x01, 0x75, 0x55 },
1127 { 0x01, 0x76, 0x56 },
1128 { 0x01, 0x77, 0x57 },
1129 { 0x01, 0x78, 0x58 },
1130 { 0x01, 0x79, 0x59 },
1131 { 0x01, 0x7a, 0x5a },
1132 { 0x00, 0x5b, 0x5b },
1133 { 0x00, 0x5c, 0x5c },
1134 { 0x00, 0x5d, 0x5d },
1135 { 0x00, 0x5e, 0x5e },
1136 { 0x00, 0x5f, 0x5f },
1137 { 0x00, 0x60, 0x60 },
1138 { 0x00, 0x61, 0x41 },
1139 { 0x00, 0x62, 0x42 },
1140 { 0x00, 0x63, 0x43 },
1141 { 0x00, 0x64, 0x44 },
1142 { 0x00, 0x65, 0x45 },
1143 { 0x00, 0x66, 0x46 },
1144 { 0x00, 0x67, 0x47 },
1145 { 0x00, 0x68, 0x48 },
1146 { 0x00, 0x69, 0x49 },
1147 { 0x00, 0x6a, 0x4a },
1148 { 0x00, 0x6b, 0x4b },
1149 { 0x00, 0x6c, 0x4c },
1150 { 0x00, 0x6d, 0x4d },
1151 { 0x00, 0x6e, 0x4e },
1152 { 0x00, 0x6f, 0x4f },
1153 { 0x00, 0x70, 0x50 },
1154 { 0x00, 0x71, 0x51 },
1155 { 0x00, 0x72, 0x52 },
1156 { 0x00, 0x73, 0x53 },
1157 { 0x00, 0x74, 0x54 },
1158 { 0x00, 0x75, 0x55 },
1159 { 0x00, 0x76, 0x56 },
1160 { 0x00, 0x77, 0x57 },
1161 { 0x00, 0x78, 0x58 },
1162 { 0x00, 0x79, 0x59 },
1163 { 0x00, 0x7a, 0x5a },
1164 { 0x00, 0x7b, 0x7b },
1165 { 0x00, 0x7c, 0x7c },
1166 { 0x00, 0x7d, 0x7d },
1167 { 0x00, 0x7e, 0x7e },
1168 { 0x00, 0x7f, 0x7f },
1169 { 0x00, 0x80, 0x80 },
1170 { 0x00, 0x81, 0x81 },
1171 { 0x00, 0x82, 0x82 },
1172 { 0x00, 0x83, 0x83 },
1173 { 0x00, 0x84, 0x84 },
1174 { 0x00, 0x85, 0x85 },
1175 { 0x00, 0x86, 0x86 },
1176 { 0x00, 0x87, 0x87 },
1177 { 0x00, 0x88, 0x88 },
1178 { 0x00, 0x89, 0x89 },
1179 { 0x00, 0x8a, 0x8a },
1180 { 0x00, 0x8b, 0x8b },
1181 { 0x00, 0x8c, 0x8c },
1182 { 0x00, 0x8d, 0x8d },
1183 { 0x00, 0x8e, 0x8e },
1184 { 0x00, 0x8f, 0x8f },
1185 { 0x00, 0x90, 0x90 },
1186 { 0x00, 0x91, 0x91 },
1187 { 0x00, 0x92, 0x92 },
1188 { 0x00, 0x93, 0x93 },
1189 { 0x00, 0x94, 0x94 },
1190 { 0x00, 0x95, 0x95 },
1191 { 0x00, 0x96, 0x96 },
1192 { 0x00, 0x97, 0x97 },
1193 { 0x00, 0x98, 0x98 },
1194 { 0x00, 0x99, 0x99 },
1195 { 0x00, 0x9a, 0x9a },
1196 { 0x00, 0x9b, 0x9b },
1197 { 0x00, 0x9c, 0x9c },
1198 { 0x00, 0x9d, 0x9d },
1199 { 0x00, 0x9e, 0x9e },
1200 { 0x00, 0x9f, 0x9f },
1201 { 0x00, 0xa0, 0xa0 },
1202 { 0x01, 0xb1, 0xa1 },
1203 { 0x00, 0xa2, 0xa2 },
1204 { 0x01, 0xb3, 0xa3 },
1205 { 0x00, 0xa4, 0xa4 },
1206 { 0x01, 0xb5, 0xa5 },
1207 { 0x01, 0xb6, 0xa6 },
1208 { 0x00, 0xa7, 0xa7 },
1209 { 0x00, 0xa8, 0xa8 },
1210 { 0x01, 0xb9, 0xa9 },
1211 { 0x01, 0xba, 0xaa },
1212 { 0x01, 0xbb, 0xab },
1213 { 0x01, 0xbc, 0xac },
1214 { 0x00, 0xad, 0xad },
1215 { 0x01, 0xbe, 0xae },
1216 { 0x01, 0xbf, 0xaf },
1217 { 0x00, 0xb0, 0xb0 },
1218 { 0x00, 0xb1, 0xa1 },
1219 { 0x00, 0xb2, 0xb2 },
1220 { 0x00, 0xb3, 0xa3 },
1221 { 0x00, 0xb4, 0xb4 },
1222 { 0x00, 0xb5, 0xa5 },
1223 { 0x00, 0xb6, 0xa6 },
1224 { 0x00, 0xb7, 0xb7 },
1225 { 0x00, 0xb8, 0xb8 },
1226 { 0x00, 0xb9, 0xa9 },
1227 { 0x00, 0xba, 0xaa },
1228 { 0x00, 0xbb, 0xab },
1229 { 0x00, 0xbc, 0xac },
1230 { 0x00, 0xbd, 0xbd },
1231 { 0x00, 0xbe, 0xae },
1232 { 0x00, 0xbf, 0xaf },
1233 { 0x01, 0xe0, 0xc0 },
1234 { 0x01, 0xe1, 0xc1 },
1235 { 0x01, 0xe2, 0xc2 },
1236 { 0x01, 0xe3, 0xc3 },
1237 { 0x01, 0xe4, 0xc4 },
1238 { 0x01, 0xe5, 0xc5 },
1239 { 0x01, 0xe6, 0xc6 },
1240 { 0x01, 0xe7, 0xc7 },
1241 { 0x01, 0xe8, 0xc8 },
1242 { 0x01, 0xe9, 0xc9 },
1243 { 0x01, 0xea, 0xca },
1244 { 0x01, 0xeb, 0xcb },
1245 { 0x01, 0xec, 0xcc },
1246 { 0x01, 0xed, 0xcd },
1247 { 0x01, 0xee, 0xce },
1248 { 0x01, 0xef, 0xcf },
1249 { 0x01, 0xf0, 0xd0 },
1250 { 0x01, 0xf1, 0xd1 },
1251 { 0x01, 0xf2, 0xd2 },
1252 { 0x01, 0xf3, 0xd3 },
1253 { 0x01, 0xf4, 0xd4 },
1254 { 0x01, 0xf5, 0xd5 },
1255 { 0x01, 0xf6, 0xd6 },
1256 { 0x00, 0xd7, 0xd7 },
1257 { 0x01, 0xf8, 0xd8 },
1258 { 0x01, 0xf9, 0xd9 },
1259 { 0x01, 0xfa, 0xda },
1260 { 0x01, 0xfb, 0xdb },
1261 { 0x01, 0xfc, 0xdc },
1262 { 0x01, 0xfd, 0xdd },
1263 { 0x01, 0xfe, 0xde },
1264 { 0x00, 0xdf, 0xdf },
1265 { 0x00, 0xe0, 0xc0 },
1266 { 0x00, 0xe1, 0xc1 },
1267 { 0x00, 0xe2, 0xc2 },
1268 { 0x00, 0xe3, 0xc3 },
1269 { 0x00, 0xe4, 0xc4 },
1270 { 0x00, 0xe5, 0xc5 },
1271 { 0x00, 0xe6, 0xc6 },
1272 { 0x00, 0xe7, 0xc7 },
1273 { 0x00, 0xe8, 0xc8 },
1274 { 0x00, 0xe9, 0xc9 },
1275 { 0x00, 0xea, 0xca },
1276 { 0x00, 0xeb, 0xcb },
1277 { 0x00, 0xec, 0xcc },
1278 { 0x00, 0xed, 0xcd },
1279 { 0x00, 0xee, 0xce },
1280 { 0x00, 0xef, 0xcf },
1281 { 0x00, 0xf0, 0xd0 },
1282 { 0x00, 0xf1, 0xd1 },
1283 { 0x00, 0xf2, 0xd2 },
1284 { 0x00, 0xf3, 0xd3 },
1285 { 0x00, 0xf4, 0xd4 },
1286 { 0x00, 0xf5, 0xd5 },
1287 { 0x00, 0xf6, 0xd6 },
1288 { 0x00, 0xf7, 0xf7 },
1289 { 0x00, 0xf8, 0xd8 },
1290 { 0x00, 0xf9, 0xd9 },
1291 { 0x00, 0xfa, 0xda },
1292 { 0x00, 0xfb, 0xdb },
1293 { 0x00, 0xfc, 0xdc },
1294 { 0x00, 0xfd, 0xdd },
1295 { 0x00, 0xfe, 0xde },
1296 { 0x00, 0xff, 0xff }
1300 struct cs_info iso3_tbl[] = {
1301 { 0x00, 0x00, 0x00 },
1302 { 0x00, 0x01, 0x01 },
1303 { 0x00, 0x02, 0x02 },
1304 { 0x00, 0x03, 0x03 },
1305 { 0x00, 0x04, 0x04 },
1306 { 0x00, 0x05, 0x05 },
1307 { 0x00, 0x06, 0x06 },
1308 { 0x00, 0x07, 0x07 },
1309 { 0x00, 0x08, 0x08 },
1310 { 0x00, 0x09, 0x09 },
1311 { 0x00, 0x0a, 0x0a },
1312 { 0x00, 0x0b, 0x0b },
1313 { 0x00, 0x0c, 0x0c },
1314 { 0x00, 0x0d, 0x0d },
1315 { 0x00, 0x0e, 0x0e },
1316 { 0x00, 0x0f, 0x0f },
1317 { 0x00, 0x10, 0x10 },
1318 { 0x00, 0x11, 0x11 },
1319 { 0x00, 0x12, 0x12 },
1320 { 0x00, 0x13, 0x13 },
1321 { 0x00, 0x14, 0x14 },
1322 { 0x00, 0x15, 0x15 },
1323 { 0x00, 0x16, 0x16 },
1324 { 0x00, 0x17, 0x17 },
1325 { 0x00, 0x18, 0x18 },
1326 { 0x00, 0x19, 0x19 },
1327 { 0x00, 0x1a, 0x1a },
1328 { 0x00, 0x1b, 0x1b },
1329 { 0x00, 0x1c, 0x1c },
1330 { 0x00, 0x1d, 0x1d },
1331 { 0x00, 0x1e, 0x1e },
1332 { 0x00, 0x1f, 0x1f },
1333 { 0x00, 0x20, 0x20 },
1334 { 0x00, 0x21, 0x21 },
1335 { 0x00, 0x22, 0x22 },
1336 { 0x00, 0x23, 0x23 },
1337 { 0x00, 0x24, 0x24 },
1338 { 0x00, 0x25, 0x25 },
1339 { 0x00, 0x26, 0x26 },
1340 { 0x00, 0x27, 0x27 },
1341 { 0x00, 0x28, 0x28 },
1342 { 0x00, 0x29, 0x29 },
1343 { 0x00, 0x2a, 0x2a },
1344 { 0x00, 0x2b, 0x2b },
1345 { 0x00, 0x2c, 0x2c },
1346 { 0x00, 0x2d, 0x2d },
1347 { 0x00, 0x2e, 0x2e },
1348 { 0x00, 0x2f, 0x2f },
1349 { 0x00, 0x30, 0x30 },
1350 { 0x00, 0x31, 0x31 },
1351 { 0x00, 0x32, 0x32 },
1352 { 0x00, 0x33, 0x33 },
1353 { 0x00, 0x34, 0x34 },
1354 { 0x00, 0x35, 0x35 },
1355 { 0x00, 0x36, 0x36 },
1356 { 0x00, 0x37, 0x37 },
1357 { 0x00, 0x38, 0x38 },
1358 { 0x00, 0x39, 0x39 },
1359 { 0x00, 0x3a, 0x3a },
1360 { 0x00, 0x3b, 0x3b },
1361 { 0x00, 0x3c, 0x3c },
1362 { 0x00, 0x3d, 0x3d },
1363 { 0x00, 0x3e, 0x3e },
1364 { 0x00, 0x3f, 0x3f },
1365 { 0x00, 0x40, 0x40 },
1366 { 0x01, 0x61, 0x41 },
1367 { 0x01, 0x62, 0x42 },
1368 { 0x01, 0x63, 0x43 },
1369 { 0x01, 0x64, 0x44 },
1370 { 0x01, 0x65, 0x45 },
1371 { 0x01, 0x66, 0x46 },
1372 { 0x01, 0x67, 0x47 },
1373 { 0x01, 0x68, 0x48 },
1374 { 0x01, 0x69, 0x49 },
1375 { 0x01, 0x6a, 0x4a },
1376 { 0x01, 0x6b, 0x4b },
1377 { 0x01, 0x6c, 0x4c },
1378 { 0x01, 0x6d, 0x4d },
1379 { 0x01, 0x6e, 0x4e },
1380 { 0x01, 0x6f, 0x4f },
1381 { 0x01, 0x70, 0x50 },
1382 { 0x01, 0x71, 0x51 },
1383 { 0x01, 0x72, 0x52 },
1384 { 0x01, 0x73, 0x53 },
1385 { 0x01, 0x74, 0x54 },
1386 { 0x01, 0x75, 0x55 },
1387 { 0x01, 0x76, 0x56 },
1388 { 0x01, 0x77, 0x57 },
1389 { 0x01, 0x78, 0x58 },
1390 { 0x01, 0x79, 0x59 },
1391 { 0x01, 0x7a, 0x5a },
1392 { 0x00, 0x5b, 0x5b },
1393 { 0x00, 0x5c, 0x5c },
1394 { 0x00, 0x5d, 0x5d },
1395 { 0x00, 0x5e, 0x5e },
1396 { 0x00, 0x5f, 0x5f },
1397 { 0x00, 0x60, 0x60 },
1398 { 0x00, 0x61, 0x41 },
1399 { 0x00, 0x62, 0x42 },
1400 { 0x00, 0x63, 0x43 },
1401 { 0x00, 0x64, 0x44 },
1402 { 0x00, 0x65, 0x45 },
1403 { 0x00, 0x66, 0x46 },
1404 { 0x00, 0x67, 0x47 },
1405 { 0x00, 0x68, 0x48 },
1406 { 0x00, 0x69, 0x49 },
1407 { 0x00, 0x6a, 0x4a },
1408 { 0x00, 0x6b, 0x4b },
1409 { 0x00, 0x6c, 0x4c },
1410 { 0x00, 0x6d, 0x4d },
1411 { 0x00, 0x6e, 0x4e },
1412 { 0x00, 0x6f, 0x4f },
1413 { 0x00, 0x70, 0x50 },
1414 { 0x00, 0x71, 0x51 },
1415 { 0x00, 0x72, 0x52 },
1416 { 0x00, 0x73, 0x53 },
1417 { 0x00, 0x74, 0x54 },
1418 { 0x00, 0x75, 0x55 },
1419 { 0x00, 0x76, 0x56 },
1420 { 0x00, 0x77, 0x57 },
1421 { 0x00, 0x78, 0x58 },
1422 { 0x00, 0x79, 0x59 },
1423 { 0x00, 0x7a, 0x5a },
1424 { 0x00, 0x7b, 0x7b },
1425 { 0x00, 0x7c, 0x7c },
1426 { 0x00, 0x7d, 0x7d },
1427 { 0x00, 0x7e, 0x7e },
1428 { 0x00, 0x7f, 0x7f },
1429 { 0x00, 0x80, 0x80 },
1430 { 0x00, 0x81, 0x81 },
1431 { 0x00, 0x82, 0x82 },
1432 { 0x00, 0x83, 0x83 },
1433 { 0x00, 0x84, 0x84 },
1434 { 0x00, 0x85, 0x85 },
1435 { 0x00, 0x86, 0x86 },
1436 { 0x00, 0x87, 0x87 },
1437 { 0x00, 0x88, 0x88 },
1438 { 0x00, 0x89, 0x89 },
1439 { 0x00, 0x8a, 0x8a },
1440 { 0x00, 0x8b, 0x8b },
1441 { 0x00, 0x8c, 0x8c },
1442 { 0x00, 0x8d, 0x8d },
1443 { 0x00, 0x8e, 0x8e },
1444 { 0x00, 0x8f, 0x8f },
1445 { 0x00, 0x90, 0x90 },
1446 { 0x00, 0x91, 0x91 },
1447 { 0x00, 0x92, 0x92 },
1448 { 0x00, 0x93, 0x93 },
1449 { 0x00, 0x94, 0x94 },
1450 { 0x00, 0x95, 0x95 },
1451 { 0x00, 0x96, 0x96 },
1452 { 0x00, 0x97, 0x97 },
1453 { 0x00, 0x98, 0x98 },
1454 { 0x00, 0x99, 0x99 },
1455 { 0x00, 0x9a, 0x9a },
1456 { 0x00, 0x9b, 0x9b },
1457 { 0x00, 0x9c, 0x9c },
1458 { 0x00, 0x9d, 0x9d },
1459 { 0x00, 0x9e, 0x9e },
1460 { 0x00, 0x9f, 0x9f },
1461 { 0x00, 0xa0, 0xa0 },
1462 { 0x01, 0xb1, 0xa1 },
1463 { 0x00, 0xa2, 0xa2 },
1464 { 0x00, 0xa3, 0xa3 },
1465 { 0x00, 0xa4, 0xa4 },
1466 { 0x00, 0xa5, 0xa5 },
1467 { 0x01, 0xb6, 0xa6 },
1468 { 0x00, 0xa7, 0xa7 },
1469 { 0x00, 0xa8, 0xa8 },
1470 { 0x01, 0x69, 0xa9 },
1471 { 0x01, 0xba, 0xaa },
1472 { 0x01, 0xbb, 0xab },
1473 { 0x01, 0xbc, 0xac },
1474 { 0x00, 0xad, 0xad },
1475 { 0x00, 0xae, 0xae },
1476 { 0x01, 0xbf, 0xaf },
1477 { 0x00, 0xb0, 0xb0 },
1478 { 0x00, 0xb1, 0xa1 },
1479 { 0x00, 0xb2, 0xb2 },
1480 { 0x00, 0xb3, 0xb3 },
1481 { 0x00, 0xb4, 0xb4 },
1482 { 0x00, 0xb5, 0xb5 },
1483 { 0x00, 0xb6, 0xa6 },
1484 { 0x00, 0xb7, 0xb7 },
1485 { 0x00, 0xb8, 0xb8 },
1486 { 0x00, 0xb9, 0x49 },
1487 { 0x00, 0xba, 0xaa },
1488 { 0x00, 0xbb, 0xab },
1489 { 0x00, 0xbc, 0xac },
1490 { 0x00, 0xbd, 0xbd },
1491 { 0x00, 0xbe, 0xbe },
1492 { 0x00, 0xbf, 0xaf },
1493 { 0x01, 0xe0, 0xc0 },
1494 { 0x01, 0xe1, 0xc1 },
1495 { 0x01, 0xe2, 0xc2 },
1496 { 0x00, 0xc3, 0xc3 },
1497 { 0x01, 0xe4, 0xc4 },
1498 { 0x01, 0xe5, 0xc5 },
1499 { 0x01, 0xe6, 0xc6 },
1500 { 0x01, 0xe7, 0xc7 },
1501 { 0x01, 0xe8, 0xc8 },
1502 { 0x01, 0xe9, 0xc9 },
1503 { 0x01, 0xea, 0xca },
1504 { 0x01, 0xeb, 0xcb },
1505 { 0x01, 0xec, 0xcc },
1506 { 0x01, 0xed, 0xcd },
1507 { 0x01, 0xee, 0xce },
1508 { 0x01, 0xef, 0xcf },
1509 { 0x00, 0xd0, 0xd0 },
1510 { 0x01, 0xf1, 0xd1 },
1511 { 0x01, 0xf2, 0xd2 },
1512 { 0x01, 0xf3, 0xd3 },
1513 { 0x01, 0xf4, 0xd4 },
1514 { 0x01, 0xf5, 0xd5 },
1515 { 0x01, 0xf6, 0xd6 },
1516 { 0x00, 0xd7, 0xd7 },
1517 { 0x01, 0xf8, 0xd8 },
1518 { 0x01, 0xf9, 0xd9 },
1519 { 0x01, 0xfa, 0xda },
1520 { 0x01, 0xfb, 0xdb },
1521 { 0x01, 0xfc, 0xdc },
1522 { 0x01, 0xfd, 0xdd },
1523 { 0x01, 0xfe, 0xde },
1524 { 0x00, 0xdf, 0xdf },
1525 { 0x00, 0xe0, 0xc0 },
1526 { 0x00, 0xe1, 0xc1 },
1527 { 0x00, 0xe2, 0xc2 },
1528 { 0x00, 0xe3, 0xe3 },
1529 { 0x00, 0xe4, 0xc4 },
1530 { 0x00, 0xe5, 0xc5 },
1531 { 0x00, 0xe6, 0xc6 },
1532 { 0x00, 0xe7, 0xc7 },
1533 { 0x00, 0xe8, 0xc8 },
1534 { 0x00, 0xe9, 0xc9 },
1535 { 0x00, 0xea, 0xca },
1536 { 0x00, 0xeb, 0xcb },
1537 { 0x00, 0xec, 0xcc },
1538 { 0x00, 0xed, 0xcd },
1539 { 0x00, 0xee, 0xce },
1540 { 0x00, 0xef, 0xcf },
1541 { 0x00, 0xf0, 0xf0 },
1542 { 0x00, 0xf1, 0xd1 },
1543 { 0x00, 0xf2, 0xd2 },
1544 { 0x00, 0xf3, 0xd3 },
1545 { 0x00, 0xf4, 0xd4 },
1546 { 0x00, 0xf5, 0xd5 },
1547 { 0x00, 0xf6, 0xd6 },
1548 { 0x00, 0xf7, 0xf7 },
1549 { 0x00, 0xf8, 0xd8 },
1550 { 0x00, 0xf9, 0xd9 },
1551 { 0x00, 0xfa, 0xda },
1552 { 0x00, 0xfb, 0xdb },
1553 { 0x00, 0xfc, 0xdc },
1554 { 0x00, 0xfd, 0xdd },
1555 { 0x00, 0xfe, 0xde },
1556 { 0x00, 0xff, 0xff }
1559 struct cs_info iso4_tbl[] = {
1560 { 0x00, 0x00, 0x00 },
1561 { 0x00, 0x01, 0x01 },
1562 { 0x00, 0x02, 0x02 },
1563 { 0x00, 0x03, 0x03 },
1564 { 0x00, 0x04, 0x04 },
1565 { 0x00, 0x05, 0x05 },
1566 { 0x00, 0x06, 0x06 },
1567 { 0x00, 0x07, 0x07 },
1568 { 0x00, 0x08, 0x08 },
1569 { 0x00, 0x09, 0x09 },
1570 { 0x00, 0x0a, 0x0a },
1571 { 0x00, 0x0b, 0x0b },
1572 { 0x00, 0x0c, 0x0c },
1573 { 0x00, 0x0d, 0x0d },
1574 { 0x00, 0x0e, 0x0e },
1575 { 0x00, 0x0f, 0x0f },
1576 { 0x00, 0x10, 0x10 },
1577 { 0x00, 0x11, 0x11 },
1578 { 0x00, 0x12, 0x12 },
1579 { 0x00, 0x13, 0x13 },
1580 { 0x00, 0x14, 0x14 },
1581 { 0x00, 0x15, 0x15 },
1582 { 0x00, 0x16, 0x16 },
1583 { 0x00, 0x17, 0x17 },
1584 { 0x00, 0x18, 0x18 },
1585 { 0x00, 0x19, 0x19 },
1586 { 0x00, 0x1a, 0x1a },
1587 { 0x00, 0x1b, 0x1b },
1588 { 0x00, 0x1c, 0x1c },
1589 { 0x00, 0x1d, 0x1d },
1590 { 0x00, 0x1e, 0x1e },
1591 { 0x00, 0x1f, 0x1f },
1592 { 0x00, 0x20, 0x20 },
1593 { 0x00, 0x21, 0x21 },
1594 { 0x00, 0x22, 0x22 },
1595 { 0x00, 0x23, 0x23 },
1596 { 0x00, 0x24, 0x24 },
1597 { 0x00, 0x25, 0x25 },
1598 { 0x00, 0x26, 0x26 },
1599 { 0x00, 0x27, 0x27 },
1600 { 0x00, 0x28, 0x28 },
1601 { 0x00, 0x29, 0x29 },
1602 { 0x00, 0x2a, 0x2a },
1603 { 0x00, 0x2b, 0x2b },
1604 { 0x00, 0x2c, 0x2c },
1605 { 0x00, 0x2d, 0x2d },
1606 { 0x00, 0x2e, 0x2e },
1607 { 0x00, 0x2f, 0x2f },
1608 { 0x00, 0x30, 0x30 },
1609 { 0x00, 0x31, 0x31 },
1610 { 0x00, 0x32, 0x32 },
1611 { 0x00, 0x33, 0x33 },
1612 { 0x00, 0x34, 0x34 },
1613 { 0x00, 0x35, 0x35 },
1614 { 0x00, 0x36, 0x36 },
1615 { 0x00, 0x37, 0x37 },
1616 { 0x00, 0x38, 0x38 },
1617 { 0x00, 0x39, 0x39 },
1618 { 0x00, 0x3a, 0x3a },
1619 { 0x00, 0x3b, 0x3b },
1620 { 0x00, 0x3c, 0x3c },
1621 { 0x00, 0x3d, 0x3d },
1622 { 0x00, 0x3e, 0x3e },
1623 { 0x00, 0x3f, 0x3f },
1624 { 0x00, 0x40, 0x40 },
1625 { 0x01, 0x61, 0x41 },
1626 { 0x01, 0x62, 0x42 },
1627 { 0x01, 0x63, 0x43 },
1628 { 0x01, 0x64, 0x44 },
1629 { 0x01, 0x65, 0x45 },
1630 { 0x01, 0x66, 0x46 },
1631 { 0x01, 0x67, 0x47 },
1632 { 0x01, 0x68, 0x48 },
1633 { 0x01, 0x69, 0x49 },
1634 { 0x01, 0x6a, 0x4a },
1635 { 0x01, 0x6b, 0x4b },
1636 { 0x01, 0x6c, 0x4c },
1637 { 0x01, 0x6d, 0x4d },
1638 { 0x01, 0x6e, 0x4e },
1639 { 0x01, 0x6f, 0x4f },
1640 { 0x01, 0x70, 0x50 },
1641 { 0x01, 0x71, 0x51 },
1642 { 0x01, 0x72, 0x52 },
1643 { 0x01, 0x73, 0x53 },
1644 { 0x01, 0x74, 0x54 },
1645 { 0x01, 0x75, 0x55 },
1646 { 0x01, 0x76, 0x56 },
1647 { 0x01, 0x77, 0x57 },
1648 { 0x01, 0x78, 0x58 },
1649 { 0x01, 0x79, 0x59 },
1650 { 0x01, 0x7a, 0x5a },
1651 { 0x00, 0x5b, 0x5b },
1652 { 0x00, 0x5c, 0x5c },
1653 { 0x00, 0x5d, 0x5d },
1654 { 0x00, 0x5e, 0x5e },
1655 { 0x00, 0x5f, 0x5f },
1656 { 0x00, 0x60, 0x60 },
1657 { 0x00, 0x61, 0x41 },
1658 { 0x00, 0x62, 0x42 },
1659 { 0x00, 0x63, 0x43 },
1660 { 0x00, 0x64, 0x44 },
1661 { 0x00, 0x65, 0x45 },
1662 { 0x00, 0x66, 0x46 },
1663 { 0x00, 0x67, 0x47 },
1664 { 0x00, 0x68, 0x48 },
1665 { 0x00, 0x69, 0x49 },
1666 { 0x00, 0x6a, 0x4a },
1667 { 0x00, 0x6b, 0x4b },
1668 { 0x00, 0x6c, 0x4c },
1669 { 0x00, 0x6d, 0x4d },
1670 { 0x00, 0x6e, 0x4e },
1671 { 0x00, 0x6f, 0x4f },
1672 { 0x00, 0x70, 0x50 },
1673 { 0x00, 0x71, 0x51 },
1674 { 0x00, 0x72, 0x52 },
1675 { 0x00, 0x73, 0x53 },
1676 { 0x00, 0x74, 0x54 },
1677 { 0x00, 0x75, 0x55 },
1678 { 0x00, 0x76, 0x56 },
1679 { 0x00, 0x77, 0x57 },
1680 { 0x00, 0x78, 0x58 },
1681 { 0x00, 0x79, 0x59 },
1682 { 0x00, 0x7a, 0x5a },
1683 { 0x00, 0x7b, 0x7b },
1684 { 0x00, 0x7c, 0x7c },
1685 { 0x00, 0x7d, 0x7d },
1686 { 0x00, 0x7e, 0x7e },
1687 { 0x00, 0x7f, 0x7f },
1688 { 0x00, 0x80, 0x80 },
1689 { 0x00, 0x81, 0x81 },
1690 { 0x00, 0x82, 0x82 },
1691 { 0x00, 0x83, 0x83 },
1692 { 0x00, 0x84, 0x84 },
1693 { 0x00, 0x85, 0x85 },
1694 { 0x00, 0x86, 0x86 },
1695 { 0x00, 0x87, 0x87 },
1696 { 0x00, 0x88, 0x88 },
1697 { 0x00, 0x89, 0x89 },
1698 { 0x00, 0x8a, 0x8a },
1699 { 0x00, 0x8b, 0x8b },
1700 { 0x00, 0x8c, 0x8c },
1701 { 0x00, 0x8d, 0x8d },
1702 { 0x00, 0x8e, 0x8e },
1703 { 0x00, 0x8f, 0x8f },
1704 { 0x00, 0x90, 0x90 },
1705 { 0x00, 0x91, 0x91 },
1706 { 0x00, 0x92, 0x92 },
1707 { 0x00, 0x93, 0x93 },
1708 { 0x00, 0x94, 0x94 },
1709 { 0x00, 0x95, 0x95 },
1710 { 0x00, 0x96, 0x96 },
1711 { 0x00, 0x97, 0x97 },
1712 { 0x00, 0x98, 0x98 },
1713 { 0x00, 0x99, 0x99 },
1714 { 0x00, 0x9a, 0x9a },
1715 { 0x00, 0x9b, 0x9b },
1716 { 0x00, 0x9c, 0x9c },
1717 { 0x00, 0x9d, 0x9d },
1718 { 0x00, 0x9e, 0x9e },
1719 { 0x00, 0x9f, 0x9f },
1720 { 0x00, 0xa0, 0xa0 },
1721 { 0x01, 0xb1, 0xa1 },
1722 { 0x00, 0xa2, 0xa2 },
1723 { 0x01, 0xb3, 0xa3 },
1724 { 0x00, 0xa4, 0xa4 },
1725 { 0x01, 0xb5, 0xa5 },
1726 { 0x01, 0xb6, 0xa6 },
1727 { 0x00, 0xa7, 0xa7 },
1728 { 0x00, 0xa8, 0xa8 },
1729 { 0x01, 0xb9, 0xa9 },
1730 { 0x01, 0xba, 0xaa },
1731 { 0x01, 0xbb, 0xab },
1732 { 0x01, 0xbc, 0xac },
1733 { 0x00, 0xad, 0xad },
1734 { 0x01, 0xbe, 0xae },
1735 { 0x00, 0xaf, 0xaf },
1736 { 0x00, 0xb0, 0xb0 },
1737 { 0x00, 0xb1, 0xa1 },
1738 { 0x00, 0xb2, 0xb2 },
1739 { 0x00, 0xb3, 0xa3 },
1740 { 0x00, 0xb4, 0xb4 },
1741 { 0x00, 0xb5, 0xa5 },
1742 { 0x00, 0xb6, 0xa6 },
1743 { 0x00, 0xb7, 0xb7 },
1744 { 0x00, 0xb8, 0xb8 },
1745 { 0x00, 0xb9, 0xa9 },
1746 { 0x00, 0xba, 0xaa },
1747 { 0x00, 0xbb, 0xab },
1748 { 0x00, 0xbc, 0xac },
1749 { 0x00, 0xbd, 0xbd },
1750 { 0x00, 0xbe, 0xae },
1751 { 0x00, 0xbf, 0xbf },
1752 { 0x01, 0xe0, 0xc0 },
1753 { 0x01, 0xe1, 0xc1 },
1754 { 0x01, 0xe2, 0xc2 },
1755 { 0x01, 0xe3, 0xc3 },
1756 { 0x01, 0xe4, 0xc4 },
1757 { 0x01, 0xe5, 0xc5 },
1758 { 0x01, 0xe6, 0xc6 },
1759 { 0x01, 0xe7, 0xc7 },
1760 { 0x01, 0xe8, 0xc8 },
1761 { 0x01, 0xe9, 0xc9 },
1762 { 0x01, 0xea, 0xca },
1763 { 0x01, 0xeb, 0xcb },
1764 { 0x01, 0xec, 0xcc },
1765 { 0x01, 0xed, 0xcd },
1766 { 0x01, 0xee, 0xce },
1767 { 0x01, 0xef, 0xcf },
1768 { 0x01, 0xf0, 0xd0 },
1769 { 0x01, 0xf1, 0xd1 },
1770 { 0x01, 0xf2, 0xd2 },
1771 { 0x01, 0xf3, 0xd3 },
1772 { 0x01, 0xf4, 0xd4 },
1773 { 0x01, 0xf5, 0xd5 },
1774 { 0x01, 0xf6, 0xd6 },
1775 { 0x00, 0xd7, 0xd7 },
1776 { 0x01, 0xf8, 0xd8 },
1777 { 0x01, 0xf9, 0xd9 },
1778 { 0x01, 0xfa, 0xda },
1779 { 0x01, 0xfb, 0xdb },
1780 { 0x01, 0xfc, 0xdc },
1781 { 0x01, 0xfd, 0xdd },
1782 { 0x01, 0xfe, 0xde },
1783 { 0x00, 0xdf, 0xdf },
1784 { 0x00, 0xe0, 0xc0 },
1785 { 0x00, 0xe1, 0xc1 },
1786 { 0x00, 0xe2, 0xc2 },
1787 { 0x00, 0xe3, 0xc3 },
1788 { 0x00, 0xe4, 0xc4 },
1789 { 0x00, 0xe5, 0xc5 },
1790 { 0x00, 0xe6, 0xc6 },
1791 { 0x00, 0xe7, 0xc7 },
1792 { 0x00, 0xe8, 0xc8 },
1793 { 0x00, 0xe9, 0xc9 },
1794 { 0x00, 0xea, 0xca },
1795 { 0x00, 0xeb, 0xcb },
1796 { 0x00, 0xec, 0xcc },
1797 { 0x00, 0xed, 0xcd },
1798 { 0x00, 0xee, 0xce },
1799 { 0x00, 0xef, 0xcf },
1800 { 0x00, 0xf0, 0xd0 },
1801 { 0x00, 0xf1, 0xd1 },
1802 { 0x00, 0xf2, 0xd2 },
1803 { 0x00, 0xf3, 0xd3 },
1804 { 0x00, 0xf4, 0xd4 },
1805 { 0x00, 0xf5, 0xd5 },
1806 { 0x00, 0xf6, 0xd6 },
1807 { 0x00, 0xf7, 0xf7 },
1808 { 0x00, 0xf8, 0xd8 },
1809 { 0x00, 0xf9, 0xd9 },
1810 { 0x00, 0xfa, 0xda },
1811 { 0x00, 0xfb, 0xdb },
1812 { 0x00, 0xfc, 0xdc },
1813 { 0x00, 0xfd, 0xdd },
1814 { 0x00, 0xfe, 0xde },
1815 { 0x00, 0xff, 0xff }
1818 struct cs_info iso5_tbl[] = {
1819 { 0x00, 0x00, 0x00 },
1820 { 0x00, 0x01, 0x01 },
1821 { 0x00, 0x02, 0x02 },
1822 { 0x00, 0x03, 0x03 },
1823 { 0x00, 0x04, 0x04 },
1824 { 0x00, 0x05, 0x05 },
1825 { 0x00, 0x06, 0x06 },
1826 { 0x00, 0x07, 0x07 },
1827 { 0x00, 0x08, 0x08 },
1828 { 0x00, 0x09, 0x09 },
1829 { 0x00, 0x0a, 0x0a },
1830 { 0x00, 0x0b, 0x0b },
1831 { 0x00, 0x0c, 0x0c },
1832 { 0x00, 0x0d, 0x0d },
1833 { 0x00, 0x0e, 0x0e },
1834 { 0x00, 0x0f, 0x0f },
1835 { 0x00, 0x10, 0x10 },
1836 { 0x00, 0x11, 0x11 },
1837 { 0x00, 0x12, 0x12 },
1838 { 0x00, 0x13, 0x13 },
1839 { 0x00, 0x14, 0x14 },
1840 { 0x00, 0x15, 0x15 },
1841 { 0x00, 0x16, 0x16 },
1842 { 0x00, 0x17, 0x17 },
1843 { 0x00, 0x18, 0x18 },
1844 { 0x00, 0x19, 0x19 },
1845 { 0x00, 0x1a, 0x1a },
1846 { 0x00, 0x1b, 0x1b },
1847 { 0x00, 0x1c, 0x1c },
1848 { 0x00, 0x1d, 0x1d },
1849 { 0x00, 0x1e, 0x1e },
1850 { 0x00, 0x1f, 0x1f },
1851 { 0x00, 0x20, 0x20 },
1852 { 0x00, 0x21, 0x21 },
1853 { 0x00, 0x22, 0x22 },
1854 { 0x00, 0x23, 0x23 },
1855 { 0x00, 0x24, 0x24 },
1856 { 0x00, 0x25, 0x25 },
1857 { 0x00, 0x26, 0x26 },
1858 { 0x00, 0x27, 0x27 },
1859 { 0x00, 0x28, 0x28 },
1860 { 0x00, 0x29, 0x29 },
1861 { 0x00, 0x2a, 0x2a },
1862 { 0x00, 0x2b, 0x2b },
1863 { 0x00, 0x2c, 0x2c },
1864 { 0x00, 0x2d, 0x2d },
1865 { 0x00, 0x2e, 0x2e },
1866 { 0x00, 0x2f, 0x2f },
1867 { 0x00, 0x30, 0x30 },
1868 { 0x00, 0x31, 0x31 },
1869 { 0x00, 0x32, 0x32 },
1870 { 0x00, 0x33, 0x33 },
1871 { 0x00, 0x34, 0x34 },
1872 { 0x00, 0x35, 0x35 },
1873 { 0x00, 0x36, 0x36 },
1874 { 0x00, 0x37, 0x37 },
1875 { 0x00, 0x38, 0x38 },
1876 { 0x00, 0x39, 0x39 },
1877 { 0x00, 0x3a, 0x3a },
1878 { 0x00, 0x3b, 0x3b },
1879 { 0x00, 0x3c, 0x3c },
1880 { 0x00, 0x3d, 0x3d },
1881 { 0x00, 0x3e, 0x3e },
1882 { 0x00, 0x3f, 0x3f },
1883 { 0x00, 0x40, 0x40 },
1884 { 0x01, 0x61, 0x41 },
1885 { 0x01, 0x62, 0x42 },
1886 { 0x01, 0x63, 0x43 },
1887 { 0x01, 0x64, 0x44 },
1888 { 0x01, 0x65, 0x45 },
1889 { 0x01, 0x66, 0x46 },
1890 { 0x01, 0x67, 0x47 },
1891 { 0x01, 0x68, 0x48 },
1892 { 0x01, 0x69, 0x49 },
1893 { 0x01, 0x6a, 0x4a },
1894 { 0x01, 0x6b, 0x4b },
1895 { 0x01, 0x6c, 0x4c },
1896 { 0x01, 0x6d, 0x4d },
1897 { 0x01, 0x6e, 0x4e },
1898 { 0x01, 0x6f, 0x4f },
1899 { 0x01, 0x70, 0x50 },
1900 { 0x01, 0x71, 0x51 },
1901 { 0x01, 0x72, 0x52 },
1902 { 0x01, 0x73, 0x53 },
1903 { 0x01, 0x74, 0x54 },
1904 { 0x01, 0x75, 0x55 },
1905 { 0x01, 0x76, 0x56 },
1906 { 0x01, 0x77, 0x57 },
1907 { 0x01, 0x78, 0x58 },
1908 { 0x01, 0x79, 0x59 },
1909 { 0x01, 0x7a, 0x5a },
1910 { 0x00, 0x5b, 0x5b },
1911 { 0x00, 0x5c, 0x5c },
1912 { 0x00, 0x5d, 0x5d },
1913 { 0x00, 0x5e, 0x5e },
1914 { 0x00, 0x5f, 0x5f },
1915 { 0x00, 0x60, 0x60 },
1916 { 0x00, 0x61, 0x41 },
1917 { 0x00, 0x62, 0x42 },
1918 { 0x00, 0x63, 0x43 },
1919 { 0x00, 0x64, 0x44 },
1920 { 0x00, 0x65, 0x45 },
1921 { 0x00, 0x66, 0x46 },
1922 { 0x00, 0x67, 0x47 },
1923 { 0x00, 0x68, 0x48 },
1924 { 0x00, 0x69, 0x49 },
1925 { 0x00, 0x6a, 0x4a },
1926 { 0x00, 0x6b, 0x4b },
1927 { 0x00, 0x6c, 0x4c },
1928 { 0x00, 0x6d, 0x4d },
1929 { 0x00, 0x6e, 0x4e },
1930 { 0x00, 0x6f, 0x4f },
1931 { 0x00, 0x70, 0x50 },
1932 { 0x00, 0x71, 0x51 },
1933 { 0x00, 0x72, 0x52 },
1934 { 0x00, 0x73, 0x53 },
1935 { 0x00, 0x74, 0x54 },
1936 { 0x00, 0x75, 0x55 },
1937 { 0x00, 0x76, 0x56 },
1938 { 0x00, 0x77, 0x57 },
1939 { 0x00, 0x78, 0x58 },
1940 { 0x00, 0x79, 0x59 },
1941 { 0x00, 0x7a, 0x5a },
1942 { 0x00, 0x7b, 0x7b },
1943 { 0x00, 0x7c, 0x7c },
1944 { 0x00, 0x7d, 0x7d },
1945 { 0x00, 0x7e, 0x7e },
1946 { 0x00, 0x7f, 0x7f },
1947 { 0x00, 0x80, 0x80 },
1948 { 0x00, 0x81, 0x81 },
1949 { 0x00, 0x82, 0x82 },
1950 { 0x00, 0x83, 0x83 },
1951 { 0x00, 0x84, 0x84 },
1952 { 0x00, 0x85, 0x85 },
1953 { 0x00, 0x86, 0x86 },
1954 { 0x00, 0x87, 0x87 },
1955 { 0x00, 0x88, 0x88 },
1956 { 0x00, 0x89, 0x89 },
1957 { 0x00, 0x8a, 0x8a },
1958 { 0x00, 0x8b, 0x8b },
1959 { 0x00, 0x8c, 0x8c },
1960 { 0x00, 0x8d, 0x8d },
1961 { 0x00, 0x8e, 0x8e },
1962 { 0x00, 0x8f, 0x8f },
1963 { 0x00, 0x90, 0x90 },
1964 { 0x00, 0x91, 0x91 },
1965 { 0x00, 0x92, 0x92 },
1966 { 0x00, 0x93, 0x93 },
1967 { 0x00, 0x94, 0x94 },
1968 { 0x00, 0x95, 0x95 },
1969 { 0x00, 0x96, 0x96 },
1970 { 0x00, 0x97, 0x97 },
1971 { 0x00, 0x98, 0x98 },
1972 { 0x00, 0x99, 0x99 },
1973 { 0x00, 0x9a, 0x9a },
1974 { 0x00, 0x9b, 0x9b },
1975 { 0x00, 0x9c, 0x9c },
1976 { 0x00, 0x9d, 0x9d },
1977 { 0x00, 0x9e, 0x9e },
1978 { 0x00, 0x9f, 0x9f },
1979 { 0x00, 0xa0, 0xa0 },
1980 { 0x01, 0xf1, 0xa1 },
1981 { 0x01, 0xf2, 0xa2 },
1982 { 0x01, 0xf3, 0xa3 },
1983 { 0x01, 0xf4, 0xa4 },
1984 { 0x01, 0xf5, 0xa5 },
1985 { 0x01, 0xf6, 0xa6 },
1986 { 0x01, 0xf7, 0xa7 },
1987 { 0x01, 0xf8, 0xa8 },
1988 { 0x01, 0xf9, 0xa9 },
1989 { 0x01, 0xfa, 0xaa },
1990 { 0x01, 0xfb, 0xab },
1991 { 0x01, 0xfc, 0xac },
1992 { 0x00, 0xad, 0xad },
1993 { 0x01, 0xfe, 0xae },
1994 { 0x01, 0xff, 0xaf },
1995 { 0x01, 0xd0, 0xb0 },
1996 { 0x01, 0xd1, 0xb1 },
1997 { 0x01, 0xd2, 0xb2 },
1998 { 0x01, 0xd3, 0xb3 },
1999 { 0x01, 0xd4, 0xb4 },
2000 { 0x01, 0xd5, 0xb5 },
2001 { 0x01, 0xd6, 0xb6 },
2002 { 0x01, 0xd7, 0xb7 },
2003 { 0x01, 0xd8, 0xb8 },
2004 { 0x01, 0xd9, 0xb9 },
2005 { 0x01, 0xda, 0xba },
2006 { 0x01, 0xdb, 0xbb },
2007 { 0x01, 0xdc, 0xbc },
2008 { 0x01, 0xdd, 0xbd },
2009 { 0x01, 0xde, 0xbe },
2010 { 0x01, 0xdf, 0xbf },
2011 { 0x01, 0xe0, 0xc0 },
2012 { 0x01, 0xe1, 0xc1 },
2013 { 0x01, 0xe2, 0xc2 },
2014 { 0x01, 0xe3, 0xc3 },
2015 { 0x01, 0xe4, 0xc4 },
2016 { 0x01, 0xe5, 0xc5 },
2017 { 0x01, 0xe6, 0xc6 },
2018 { 0x01, 0xe7, 0xc7 },
2019 { 0x01, 0xe8, 0xc8 },
2020 { 0x01, 0xe9, 0xc9 },
2021 { 0x01, 0xea, 0xca },
2022 { 0x01, 0xeb, 0xcb },
2023 { 0x01, 0xec, 0xcc },
2024 { 0x01, 0xed, 0xcd },
2025 { 0x01, 0xee, 0xce },
2026 { 0x01, 0xef, 0xcf },
2027 { 0x00, 0xd0, 0xb0 },
2028 { 0x00, 0xd1, 0xb1 },
2029 { 0x00, 0xd2, 0xb2 },
2030 { 0x00, 0xd3, 0xb3 },
2031 { 0x00, 0xd4, 0xb4 },
2032 { 0x00, 0xd5, 0xb5 },
2033 { 0x00, 0xd6, 0xb6 },
2034 { 0x00, 0xd7, 0xb7 },
2035 { 0x00, 0xd8, 0xb8 },
2036 { 0x00, 0xd9, 0xb9 },
2037 { 0x00, 0xda, 0xba },
2038 { 0x00, 0xdb, 0xbb },
2039 { 0x00, 0xdc, 0xbc },
2040 { 0x00, 0xdd, 0xbd },
2041 { 0x00, 0xde, 0xbe },
2042 { 0x00, 0xdf, 0xbf },
2043 { 0x00, 0xe0, 0xc0 },
2044 { 0x00, 0xe1, 0xc1 },
2045 { 0x00, 0xe2, 0xc2 },
2046 { 0x00, 0xe3, 0xc3 },
2047 { 0x00, 0xe4, 0xc4 },
2048 { 0x00, 0xe5, 0xc5 },
2049 { 0x00, 0xe6, 0xc6 },
2050 { 0x00, 0xe7, 0xc7 },
2051 { 0x00, 0xe8, 0xc8 },
2052 { 0x00, 0xe9, 0xc9 },
2053 { 0x00, 0xea, 0xca },
2054 { 0x00, 0xeb, 0xcb },
2055 { 0x00, 0xec, 0xcc },
2056 { 0x00, 0xed, 0xcd },
2057 { 0x00, 0xee, 0xce },
2058 { 0x00, 0xef, 0xcf },
2059 { 0x00, 0xf0, 0xf0 },
2060 { 0x00, 0xf1, 0xa1 },
2061 { 0x00, 0xf2, 0xa2 },
2062 { 0x00, 0xf3, 0xa3 },
2063 { 0x00, 0xf4, 0xa4 },
2064 { 0x00, 0xf5, 0xa5 },
2065 { 0x00, 0xf6, 0xa6 },
2066 { 0x00, 0xf7, 0xa7 },
2067 { 0x00, 0xf8, 0xa8 },
2068 { 0x00, 0xf9, 0xa9 },
2069 { 0x00, 0xfa, 0xaa },
2070 { 0x00, 0xfb, 0xab },
2071 { 0x00, 0xfc, 0xac },
2072 { 0x00, 0xfd, 0xfd },
2073 { 0x00, 0xfe, 0xae },
2074 { 0x00, 0xff, 0xaf }
2077 struct cs_info iso6_tbl[] = {
2078 { 0x00, 0x00, 0x00 },
2079 { 0x00, 0x01, 0x01 },
2080 { 0x00, 0x02, 0x02 },
2081 { 0x00, 0x03, 0x03 },
2082 { 0x00, 0x04, 0x04 },
2083 { 0x00, 0x05, 0x05 },
2084 { 0x00, 0x06, 0x06 },
2085 { 0x00, 0x07, 0x07 },
2086 { 0x00, 0x08, 0x08 },
2087 { 0x00, 0x09, 0x09 },
2088 { 0x00, 0x0a, 0x0a },
2089 { 0x00, 0x0b, 0x0b },
2090 { 0x00, 0x0c, 0x0c },
2091 { 0x00, 0x0d, 0x0d },
2092 { 0x00, 0x0e, 0x0e },
2093 { 0x00, 0x0f, 0x0f },
2094 { 0x00, 0x10, 0x10 },
2095 { 0x00, 0x11, 0x11 },
2096 { 0x00, 0x12, 0x12 },
2097 { 0x00, 0x13, 0x13 },
2098 { 0x00, 0x14, 0x14 },
2099 { 0x00, 0x15, 0x15 },
2100 { 0x00, 0x16, 0x16 },
2101 { 0x00, 0x17, 0x17 },
2102 { 0x00, 0x18, 0x18 },
2103 { 0x00, 0x19, 0x19 },
2104 { 0x00, 0x1a, 0x1a },
2105 { 0x00, 0x1b, 0x1b },
2106 { 0x00, 0x1c, 0x1c },
2107 { 0x00, 0x1d, 0x1d },
2108 { 0x00, 0x1e, 0x1e },
2109 { 0x00, 0x1f, 0x1f },
2110 { 0x00, 0x20, 0x20 },
2111 { 0x00, 0x21, 0x21 },
2112 { 0x00, 0x22, 0x22 },
2113 { 0x00, 0x23, 0x23 },
2114 { 0x00, 0x24, 0x24 },
2115 { 0x00, 0x25, 0x25 },
2116 { 0x00, 0x26, 0x26 },
2117 { 0x00, 0x27, 0x27 },
2118 { 0x00, 0x28, 0x28 },
2119 { 0x00, 0x29, 0x29 },
2120 { 0x00, 0x2a, 0x2a },
2121 { 0x00, 0x2b, 0x2b },
2122 { 0x00, 0x2c, 0x2c },
2123 { 0x00, 0x2d, 0x2d },
2124 { 0x00, 0x2e, 0x2e },
2125 { 0x00, 0x2f, 0x2f },
2126 { 0x00, 0x30, 0x30 },
2127 { 0x00, 0x31, 0x31 },
2128 { 0x00, 0x32, 0x32 },
2129 { 0x00, 0x33, 0x33 },
2130 { 0x00, 0x34, 0x34 },
2131 { 0x00, 0x35, 0x35 },
2132 { 0x00, 0x36, 0x36 },
2133 { 0x00, 0x37, 0x37 },
2134 { 0x00, 0x38, 0x38 },
2135 { 0x00, 0x39, 0x39 },
2136 { 0x00, 0x3a, 0x3a },
2137 { 0x00, 0x3b, 0x3b },
2138 { 0x00, 0x3c, 0x3c },
2139 { 0x00, 0x3d, 0x3d },
2140 { 0x00, 0x3e, 0x3e },
2141 { 0x00, 0x3f, 0x3f },
2142 { 0x00, 0x40, 0x40 },
2143 { 0x01, 0x61, 0x41 },
2144 { 0x01, 0x62, 0x42 },
2145 { 0x01, 0x63, 0x43 },
2146 { 0x01, 0x64, 0x44 },
2147 { 0x01, 0x65, 0x45 },
2148 { 0x01, 0x66, 0x46 },
2149 { 0x01, 0x67, 0x47 },
2150 { 0x01, 0x68, 0x48 },
2151 { 0x01, 0x69, 0x49 },
2152 { 0x01, 0x6a, 0x4a },
2153 { 0x01, 0x6b, 0x4b },
2154 { 0x01, 0x6c, 0x4c },
2155 { 0x01, 0x6d, 0x4d },
2156 { 0x01, 0x6e, 0x4e },
2157 { 0x01, 0x6f, 0x4f },
2158 { 0x01, 0x70, 0x50 },
2159 { 0x01, 0x71, 0x51 },
2160 { 0x01, 0x72, 0x52 },
2161 { 0x01, 0x73, 0x53 },
2162 { 0x01, 0x74, 0x54 },
2163 { 0x01, 0x75, 0x55 },
2164 { 0x01, 0x76, 0x56 },
2165 { 0x01, 0x77, 0x57 },
2166 { 0x01, 0x78, 0x58 },
2167 { 0x01, 0x79, 0x59 },
2168 { 0x01, 0x7a, 0x5a },
2169 { 0x00, 0x5b, 0x5b },
2170 { 0x00, 0x5c, 0x5c },
2171 { 0x00, 0x5d, 0x5d },
2172 { 0x00, 0x5e, 0x5e },
2173 { 0x00, 0x5f, 0x5f },
2174 { 0x00, 0x60, 0x60 },
2175 { 0x00, 0x61, 0x41 },
2176 { 0x00, 0x62, 0x42 },
2177 { 0x00, 0x63, 0x43 },
2178 { 0x00, 0x64, 0x44 },
2179 { 0x00, 0x65, 0x45 },
2180 { 0x00, 0x66, 0x46 },
2181 { 0x00, 0x67, 0x47 },
2182 { 0x00, 0x68, 0x48 },
2183 { 0x00, 0x69, 0x49 },
2184 { 0x00, 0x6a, 0x4a },
2185 { 0x00, 0x6b, 0x4b },
2186 { 0x00, 0x6c, 0x4c },
2187 { 0x00, 0x6d, 0x4d },
2188 { 0x00, 0x6e, 0x4e },
2189 { 0x00, 0x6f, 0x4f },
2190 { 0x00, 0x70, 0x50 },
2191 { 0x00, 0x71, 0x51 },
2192 { 0x00, 0x72, 0x52 },
2193 { 0x00, 0x73, 0x53 },
2194 { 0x00, 0x74, 0x54 },
2195 { 0x00, 0x75, 0x55 },
2196 { 0x00, 0x76, 0x56 },
2197 { 0x00, 0x77, 0x57 },
2198 { 0x00, 0x78, 0x58 },
2199 { 0x00, 0x79, 0x59 },
2200 { 0x00, 0x7a, 0x5a },
2201 { 0x00, 0x7b, 0x7b },
2202 { 0x00, 0x7c, 0x7c },
2203 { 0x00, 0x7d, 0x7d },
2204 { 0x00, 0x7e, 0x7e },
2205 { 0x00, 0x7f, 0x7f },
2206 { 0x00, 0x80, 0x80 },
2207 { 0x00, 0x81, 0x81 },
2208 { 0x00, 0x82, 0x82 },
2209 { 0x00, 0x83, 0x83 },
2210 { 0x00, 0x84, 0x84 },
2211 { 0x00, 0x85, 0x85 },
2212 { 0x00, 0x86, 0x86 },
2213 { 0x00, 0x87, 0x87 },
2214 { 0x00, 0x88, 0x88 },
2215 { 0x00, 0x89, 0x89 },
2216 { 0x00, 0x8a, 0x8a },
2217 { 0x00, 0x8b, 0x8b },
2218 { 0x00, 0x8c, 0x8c },
2219 { 0x00, 0x8d, 0x8d },
2220 { 0x00, 0x8e, 0x8e },
2221 { 0x00, 0x8f, 0x8f },
2222 { 0x00, 0x90, 0x90 },
2223 { 0x00, 0x91, 0x91 },
2224 { 0x00, 0x92, 0x92 },
2225 { 0x00, 0x93, 0x93 },
2226 { 0x00, 0x94, 0x94 },
2227 { 0x00, 0x95, 0x95 },
2228 { 0x00, 0x96, 0x96 },
2229 { 0x00, 0x97, 0x97 },
2230 { 0x00, 0x98, 0x98 },
2231 { 0x00, 0x99, 0x99 },
2232 { 0x00, 0x9a, 0x9a },
2233 { 0x00, 0x9b, 0x9b },
2234 { 0x00, 0x9c, 0x9c },
2235 { 0x00, 0x9d, 0x9d },
2236 { 0x00, 0x9e, 0x9e },
2237 { 0x00, 0x9f, 0x9f },
2238 { 0x00, 0xa0, 0xa0 },
2239 { 0x00, 0xa1, 0xa1 },
2240 { 0x00, 0xa2, 0xa2 },
2241 { 0x00, 0xa3, 0xa3 },
2242 { 0x00, 0xa4, 0xa4 },
2243 { 0x00, 0xa5, 0xa5 },
2244 { 0x00, 0xa6, 0xa6 },
2245 { 0x00, 0xa7, 0xa7 },
2246 { 0x00, 0xa8, 0xa8 },
2247 { 0x00, 0xa9, 0xa9 },
2248 { 0x00, 0xaa, 0xaa },
2249 { 0x00, 0xab, 0xab },
2250 { 0x00, 0xac, 0xac },
2251 { 0x00, 0xad, 0xad },
2252 { 0x00, 0xae, 0xae },
2253 { 0x00, 0xaf, 0xaf },
2254 { 0x00, 0xb0, 0xb0 },
2255 { 0x00, 0xb1, 0xb1 },
2256 { 0x00, 0xb2, 0xb2 },
2257 { 0x00, 0xb3, 0xb3 },
2258 { 0x00, 0xb4, 0xb4 },
2259 { 0x00, 0xb5, 0xb5 },
2260 { 0x00, 0xb6, 0xb6 },
2261 { 0x00, 0xb7, 0xb7 },
2262 { 0x00, 0xb8, 0xb8 },
2263 { 0x00, 0xb9, 0xb9 },
2264 { 0x00, 0xba, 0xba },
2265 { 0x00, 0xbb, 0xbb },
2266 { 0x00, 0xbc, 0xbc },
2267 { 0x00, 0xbd, 0xbd },
2268 { 0x00, 0xbe, 0xbe },
2269 { 0x00, 0xbf, 0xbf },
2270 { 0x00, 0xc0, 0xc0 },
2271 { 0x00, 0xc1, 0xc1 },
2272 { 0x00, 0xc2, 0xc2 },
2273 { 0x00, 0xc3, 0xc3 },
2274 { 0x00, 0xc4, 0xc4 },
2275 { 0x00, 0xc5, 0xc5 },
2276 { 0x00, 0xc6, 0xc6 },
2277 { 0x00, 0xc7, 0xc7 },
2278 { 0x00, 0xc8, 0xc8 },
2279 { 0x00, 0xc9, 0xc9 },
2280 { 0x00, 0xca, 0xca },
2281 { 0x00, 0xcb, 0xcb },
2282 { 0x00, 0xcc, 0xcc },
2283 { 0x00, 0xcd, 0xcd },
2284 { 0x00, 0xce, 0xce },
2285 { 0x00, 0xcf, 0xcf },
2286 { 0x00, 0xd0, 0xd0 },
2287 { 0x00, 0xd1, 0xd1 },
2288 { 0x00, 0xd2, 0xd2 },
2289 { 0x00, 0xd3, 0xd3 },
2290 { 0x00, 0xd4, 0xd4 },
2291 { 0x00, 0xd5, 0xd5 },
2292 { 0x00, 0xd6, 0xd6 },
2293 { 0x00, 0xd7, 0xd7 },
2294 { 0x00, 0xd8, 0xd8 },
2295 { 0x00, 0xd9, 0xd9 },
2296 { 0x00, 0xda, 0xda },
2297 { 0x00, 0xdb, 0xdb },
2298 { 0x00, 0xdc, 0xdc },
2299 { 0x00, 0xdd, 0xdd },
2300 { 0x00, 0xde, 0xde },
2301 { 0x00, 0xdf, 0xdf },
2302 { 0x00, 0xe0, 0xe0 },
2303 { 0x00, 0xe1, 0xe1 },
2304 { 0x00, 0xe2, 0xe2 },
2305 { 0x00, 0xe3, 0xe3 },
2306 { 0x00, 0xe4, 0xe4 },
2307 { 0x00, 0xe5, 0xe5 },
2308 { 0x00, 0xe6, 0xe6 },
2309 { 0x00, 0xe7, 0xe7 },
2310 { 0x00, 0xe8, 0xe8 },
2311 { 0x00, 0xe9, 0xe9 },
2312 { 0x00, 0xea, 0xea },
2313 { 0x00, 0xeb, 0xeb },
2314 { 0x00, 0xec, 0xec },
2315 { 0x00, 0xed, 0xed },
2316 { 0x00, 0xee, 0xee },
2317 { 0x00, 0xef, 0xef },
2318 { 0x00, 0xf0, 0xf0 },
2319 { 0x00, 0xf1, 0xf1 },
2320 { 0x00, 0xf2, 0xf2 },
2321 { 0x00, 0xf3, 0xf3 },
2322 { 0x00, 0xf4, 0xf4 },
2323 { 0x00, 0xf5, 0xf5 },
2324 { 0x00, 0xf6, 0xf6 },
2325 { 0x00, 0xf7, 0xf7 },
2326 { 0x00, 0xf8, 0xf8 },
2327 { 0x00, 0xf9, 0xf9 },
2328 { 0x00, 0xfa, 0xfa },
2329 { 0x00, 0xfb, 0xfb },
2330 { 0x00, 0xfc, 0xfc },
2331 { 0x00, 0xfd, 0xfd },
2332 { 0x00, 0xfe, 0xfe },
2333 { 0x00, 0xff, 0xff }
2336 struct cs_info iso7_tbl[] = {
2337 { 0x00, 0x00, 0x00 },
2338 { 0x00, 0x01, 0x01 },
2339 { 0x00, 0x02, 0x02 },
2340 { 0x00, 0x03, 0x03 },
2341 { 0x00, 0x04, 0x04 },
2342 { 0x00, 0x05, 0x05 },
2343 { 0x00, 0x06, 0x06 },
2344 { 0x00, 0x07, 0x07 },
2345 { 0x00, 0x08, 0x08 },
2346 { 0x00, 0x09, 0x09 },
2347 { 0x00, 0x0a, 0x0a },
2348 { 0x00, 0x0b, 0x0b },
2349 { 0x00, 0x0c, 0x0c },
2350 { 0x00, 0x0d, 0x0d },
2351 { 0x00, 0x0e, 0x0e },
2352 { 0x00, 0x0f, 0x0f },
2353 { 0x00, 0x10, 0x10 },
2354 { 0x00, 0x11, 0x11 },
2355 { 0x00, 0x12, 0x12 },
2356 { 0x00, 0x13, 0x13 },
2357 { 0x00, 0x14, 0x14 },
2358 { 0x00, 0x15, 0x15 },
2359 { 0x00, 0x16, 0x16 },
2360 { 0x00, 0x17, 0x17 },
2361 { 0x00, 0x18, 0x18 },
2362 { 0x00, 0x19, 0x19 },
2363 { 0x00, 0x1a, 0x1a },
2364 { 0x00, 0x1b, 0x1b },
2365 { 0x00, 0x1c, 0x1c },
2366 { 0x00, 0x1d, 0x1d },
2367 { 0x00, 0x1e, 0x1e },
2368 { 0x00, 0x1f, 0x1f },
2369 { 0x00, 0x20, 0x20 },
2370 { 0x00, 0x21, 0x21 },
2371 { 0x00, 0x22, 0x22 },
2372 { 0x00, 0x23, 0x23 },
2373 { 0x00, 0x24, 0x24 },
2374 { 0x00, 0x25, 0x25 },
2375 { 0x00, 0x26, 0x26 },
2376 { 0x00, 0x27, 0x27 },
2377 { 0x00, 0x28, 0x28 },
2378 { 0x00, 0x29, 0x29 },
2379 { 0x00, 0x2a, 0x2a },
2380 { 0x00, 0x2b, 0x2b },
2381 { 0x00, 0x2c, 0x2c },
2382 { 0x00, 0x2d, 0x2d },
2383 { 0x00, 0x2e, 0x2e },
2384 { 0x00, 0x2f, 0x2f },
2385 { 0x00, 0x30, 0x30 },
2386 { 0x00, 0x31, 0x31 },
2387 { 0x00, 0x32, 0x32 },
2388 { 0x00, 0x33, 0x33 },
2389 { 0x00, 0x34, 0x34 },
2390 { 0x00, 0x35, 0x35 },
2391 { 0x00, 0x36, 0x36 },
2392 { 0x00, 0x37, 0x37 },
2393 { 0x00, 0x38, 0x38 },
2394 { 0x00, 0x39, 0x39 },
2395 { 0x00, 0x3a, 0x3a },
2396 { 0x00, 0x3b, 0x3b },
2397 { 0x00, 0x3c, 0x3c },
2398 { 0x00, 0x3d, 0x3d },
2399 { 0x00, 0x3e, 0x3e },
2400 { 0x00, 0x3f, 0x3f },
2401 { 0x00, 0x40, 0x40 },
2402 { 0x01, 0x61, 0x41 },
2403 { 0x01, 0x62, 0x42 },
2404 { 0x01, 0x63, 0x43 },
2405 { 0x01, 0x64, 0x44 },
2406 { 0x01, 0x65, 0x45 },
2407 { 0x01, 0x66, 0x46 },
2408 { 0x01, 0x67, 0x47 },
2409 { 0x01, 0x68, 0x48 },
2410 { 0x01, 0x69, 0x49 },
2411 { 0x01, 0x6a, 0x4a },
2412 { 0x01, 0x6b, 0x4b },
2413 { 0x01, 0x6c, 0x4c },
2414 { 0x01, 0x6d, 0x4d },
2415 { 0x01, 0x6e, 0x4e },
2416 { 0x01, 0x6f, 0x4f },
2417 { 0x01, 0x70, 0x50 },
2418 { 0x01, 0x71, 0x51 },
2419 { 0x01, 0x72, 0x52 },
2420 { 0x01, 0x73, 0x53 },
2421 { 0x01, 0x74, 0x54 },
2422 { 0x01, 0x75, 0x55 },
2423 { 0x01, 0x76, 0x56 },
2424 { 0x01, 0x77, 0x57 },
2425 { 0x01, 0x78, 0x58 },
2426 { 0x01, 0x79, 0x59 },
2427 { 0x01, 0x7a, 0x5a },
2428 { 0x00, 0x5b, 0x5b },
2429 { 0x00, 0x5c, 0x5c },
2430 { 0x00, 0x5d, 0x5d },
2431 { 0x00, 0x5e, 0x5e },
2432 { 0x00, 0x5f, 0x5f },
2433 { 0x00, 0x60, 0x60 },
2434 { 0x00, 0x61, 0x41 },
2435 { 0x00, 0x62, 0x42 },
2436 { 0x00, 0x63, 0x43 },
2437 { 0x00, 0x64, 0x44 },
2438 { 0x00, 0x65, 0x45 },
2439 { 0x00, 0x66, 0x46 },
2440 { 0x00, 0x67, 0x47 },
2441 { 0x00, 0x68, 0x48 },
2442 { 0x00, 0x69, 0x49 },
2443 { 0x00, 0x6a, 0x4a },
2444 { 0x00, 0x6b, 0x4b },
2445 { 0x00, 0x6c, 0x4c },
2446 { 0x00, 0x6d, 0x4d },
2447 { 0x00, 0x6e, 0x4e },
2448 { 0x00, 0x6f, 0x4f },
2449 { 0x00, 0x70, 0x50 },
2450 { 0x00, 0x71, 0x51 },
2451 { 0x00, 0x72, 0x52 },
2452 { 0x00, 0x73, 0x53 },
2453 { 0x00, 0x74, 0x54 },
2454 { 0x00, 0x75, 0x55 },
2455 { 0x00, 0x76, 0x56 },
2456 { 0x00, 0x77, 0x57 },
2457 { 0x00, 0x78, 0x58 },
2458 { 0x00, 0x79, 0x59 },
2459 { 0x00, 0x7a, 0x5a },
2460 { 0x00, 0x7b, 0x7b },
2461 { 0x00, 0x7c, 0x7c },
2462 { 0x00, 0x7d, 0x7d },
2463 { 0x00, 0x7e, 0x7e },
2464 { 0x00, 0x7f, 0x7f },
2465 { 0x00, 0x80, 0x80 },
2466 { 0x00, 0x81, 0x81 },
2467 { 0x00, 0x82, 0x82 },
2468 { 0x00, 0x83, 0x83 },
2469 { 0x00, 0x84, 0x84 },
2470 { 0x00, 0x85, 0x85 },
2471 { 0x00, 0x86, 0x86 },
2472 { 0x00, 0x87, 0x87 },
2473 { 0x00, 0x88, 0x88 },
2474 { 0x00, 0x89, 0x89 },
2475 { 0x00, 0x8a, 0x8a },
2476 { 0x00, 0x8b, 0x8b },
2477 { 0x00, 0x8c, 0x8c },
2478 { 0x00, 0x8d, 0x8d },
2479 { 0x00, 0x8e, 0x8e },
2480 { 0x00, 0x8f, 0x8f },
2481 { 0x00, 0x90, 0x90 },
2482 { 0x00, 0x91, 0x91 },
2483 { 0x00, 0x92, 0x92 },
2484 { 0x00, 0x93, 0x93 },
2485 { 0x00, 0x94, 0x94 },
2486 { 0x00, 0x95, 0x95 },
2487 { 0x00, 0x96, 0x96 },
2488 { 0x00, 0x97, 0x97 },
2489 { 0x00, 0x98, 0x98 },
2490 { 0x00, 0x99, 0x99 },
2491 { 0x00, 0x9a, 0x9a },
2492 { 0x00, 0x9b, 0x9b },
2493 { 0x00, 0x9c, 0x9c },
2494 { 0x00, 0x9d, 0x9d },
2495 { 0x00, 0x9e, 0x9e },
2496 { 0x00, 0x9f, 0x9f },
2497 { 0x00, 0xa0, 0xa0 },
2498 { 0x00, 0xa1, 0xa1 },
2499 { 0x00, 0xa2, 0xa2 },
2500 { 0x00, 0xa3, 0xa3 },
2501 { 0x00, 0xa4, 0xa4 },
2502 { 0x00, 0xa5, 0xa5 },
2503 { 0x00, 0xa6, 0xa6 },
2504 { 0x00, 0xa7, 0xa7 },
2505 { 0x00, 0xa8, 0xa8 },
2506 { 0x00, 0xa9, 0xa9 },
2507 { 0x00, 0xaa, 0xaa },
2508 { 0x00, 0xab, 0xab },
2509 { 0x00, 0xac, 0xac },
2510 { 0x00, 0xad, 0xad },
2511 { 0x00, 0xae, 0xae },
2512 { 0x00, 0xaf, 0xaf },
2513 { 0x00, 0xb0, 0xb0 },
2514 { 0x00, 0xb1, 0xb1 },
2515 { 0x00, 0xb2, 0xb2 },
2516 { 0x00, 0xb3, 0xb3 },
2517 { 0x00, 0xb4, 0xb4 },
2518 { 0x00, 0xb5, 0xb5 },
2519 { 0x01, 0xdc, 0xb6 },
2520 { 0x00, 0xb7, 0xb7 },
2521 { 0x01, 0xdd, 0xb8 },
2522 { 0x01, 0xde, 0xb9 },
2523 { 0x01, 0xdf, 0xba },
2524 { 0x00, 0xbb, 0xbb },
2525 { 0x01, 0xfc, 0xbc },
2526 { 0x00, 0xbd, 0xbd },
2527 { 0x01, 0xfd, 0xbe },
2528 { 0x01, 0xfe, 0xbf },
2529 { 0x00, 0xc0, 0xc0 },
2530 { 0x01, 0xe1, 0xc1 },
2531 { 0x01, 0xe2, 0xc2 },
2532 { 0x01, 0xe3, 0xc3 },
2533 { 0x01, 0xe4, 0xc4 },
2534 { 0x01, 0xe5, 0xc5 },
2535 { 0x01, 0xe6, 0xc6 },
2536 { 0x01, 0xe7, 0xc7 },
2537 { 0x01, 0xe8, 0xc8 },
2538 { 0x01, 0xe9, 0xc9 },
2539 { 0x01, 0xea, 0xca },
2540 { 0x01, 0xeb, 0xcb },
2541 { 0x01, 0xec, 0xcc },
2542 { 0x01, 0xed, 0xcd },
2543 { 0x01, 0xee, 0xce },
2544 { 0x01, 0xef, 0xcf },
2545 { 0x01, 0xf0, 0xd0 },
2546 { 0x01, 0xf1, 0xd1 },
2547 { 0x00, 0xd2, 0xd2 },
2548 { 0x01, 0xf3, 0xd3 },
2549 { 0x01, 0xf4, 0xd4 },
2550 { 0x01, 0xf5, 0xd5 },
2551 { 0x01, 0xf6, 0xd6 },
2552 { 0x01, 0xf7, 0xd7 },
2553 { 0x01, 0xf8, 0xd8 },
2554 { 0x01, 0xf9, 0xd9 },
2555 { 0x01, 0xfa, 0xda },
2556 { 0x01, 0xfb, 0xdb },
2557 { 0x00, 0xdc, 0xb6 },
2558 { 0x00, 0xdd, 0xb8 },
2559 { 0x00, 0xde, 0xb9 },
2560 { 0x00, 0xdf, 0xba },
2561 { 0x00, 0xe0, 0xe0 },
2562 { 0x00, 0xe1, 0xc1 },
2563 { 0x00, 0xe2, 0xc2 },
2564 { 0x00, 0xe3, 0xc3 },
2565 { 0x00, 0xe4, 0xc4 },
2566 { 0x00, 0xe5, 0xc5 },
2567 { 0x00, 0xe6, 0xc6 },
2568 { 0x00, 0xe7, 0xc7 },
2569 { 0x00, 0xe8, 0xc8 },
2570 { 0x00, 0xe9, 0xc9 },
2571 { 0x00, 0xea, 0xca },
2572 { 0x00, 0xeb, 0xcb },
2573 { 0x00, 0xec, 0xcc },
2574 { 0x00, 0xed, 0xcd },
2575 { 0x00, 0xee, 0xce },
2576 { 0x00, 0xef, 0xcf },
2577 { 0x00, 0xf0, 0xd0 },
2578 { 0x00, 0xf1, 0xd1 },
2579 { 0x00, 0xf2, 0xd3 },
2580 { 0x00, 0xf3, 0xd3 },
2581 { 0x00, 0xf4, 0xd4 },
2582 { 0x00, 0xf5, 0xd5 },
2583 { 0x00, 0xf6, 0xd6 },
2584 { 0x00, 0xf7, 0xd7 },
2585 { 0x00, 0xf8, 0xd8 },
2586 { 0x00, 0xf9, 0xd9 },
2587 { 0x00, 0xfa, 0xda },
2588 { 0x00, 0xfb, 0xdb },
2589 { 0x00, 0xfc, 0xbc },
2590 { 0x00, 0xfd, 0xbe },
2591 { 0x00, 0xfe, 0xbf },
2592 { 0x00, 0xff, 0xff }
2595 struct cs_info iso8_tbl[] = {
2596 { 0x00, 0x00, 0x00 },
2597 { 0x00, 0x01, 0x01 },
2598 { 0x00, 0x02, 0x02 },
2599 { 0x00, 0x03, 0x03 },
2600 { 0x00, 0x04, 0x04 },
2601 { 0x00, 0x05, 0x05 },
2602 { 0x00, 0x06, 0x06 },
2603 { 0x00, 0x07, 0x07 },
2604 { 0x00, 0x08, 0x08 },
2605 { 0x00, 0x09, 0x09 },
2606 { 0x00, 0x0a, 0x0a },
2607 { 0x00, 0x0b, 0x0b },
2608 { 0x00, 0x0c, 0x0c },
2609 { 0x00, 0x0d, 0x0d },
2610 { 0x00, 0x0e, 0x0e },
2611 { 0x00, 0x0f, 0x0f },
2612 { 0x00, 0x10, 0x10 },
2613 { 0x00, 0x11, 0x11 },
2614 { 0x00, 0x12, 0x12 },
2615 { 0x00, 0x13, 0x13 },
2616 { 0x00, 0x14, 0x14 },
2617 { 0x00, 0x15, 0x15 },
2618 { 0x00, 0x16, 0x16 },
2619 { 0x00, 0x17, 0x17 },
2620 { 0x00, 0x18, 0x18 },
2621 { 0x00, 0x19, 0x19 },
2622 { 0x00, 0x1a, 0x1a },
2623 { 0x00, 0x1b, 0x1b },
2624 { 0x00, 0x1c, 0x1c },
2625 { 0x00, 0x1d, 0x1d },
2626 { 0x00, 0x1e, 0x1e },
2627 { 0x00, 0x1f, 0x1f },
2628 { 0x00, 0x20, 0x20 },
2629 { 0x00, 0x21, 0x21 },
2630 { 0x00, 0x22, 0x22 },
2631 { 0x00, 0x23, 0x23 },
2632 { 0x00, 0x24, 0x24 },
2633 { 0x00, 0x25, 0x25 },
2634 { 0x00, 0x26, 0x26 },
2635 { 0x00, 0x27, 0x27 },
2636 { 0x00, 0x28, 0x28 },
2637 { 0x00, 0x29, 0x29 },
2638 { 0x00, 0x2a, 0x2a },
2639 { 0x00, 0x2b, 0x2b },
2640 { 0x00, 0x2c, 0x2c },
2641 { 0x00, 0x2d, 0x2d },
2642 { 0x00, 0x2e, 0x2e },
2643 { 0x00, 0x2f, 0x2f },
2644 { 0x00, 0x30, 0x30 },
2645 { 0x00, 0x31, 0x31 },
2646 { 0x00, 0x32, 0x32 },
2647 { 0x00, 0x33, 0x33 },
2648 { 0x00, 0x34, 0x34 },
2649 { 0x00, 0x35, 0x35 },
2650 { 0x00, 0x36, 0x36 },
2651 { 0x00, 0x37, 0x37 },
2652 { 0x00, 0x38, 0x38 },
2653 { 0x00, 0x39, 0x39 },
2654 { 0x00, 0x3a, 0x3a },
2655 { 0x00, 0x3b, 0x3b },
2656 { 0x00, 0x3c, 0x3c },
2657 { 0x00, 0x3d, 0x3d },
2658 { 0x00, 0x3e, 0x3e },
2659 { 0x00, 0x3f, 0x3f },
2660 { 0x00, 0x40, 0x40 },
2661 { 0x01, 0x61, 0x41 },
2662 { 0x01, 0x62, 0x42 },
2663 { 0x01, 0x63, 0x43 },
2664 { 0x01, 0x64, 0x44 },
2665 { 0x01, 0x65, 0x45 },
2666 { 0x01, 0x66, 0x46 },
2667 { 0x01, 0x67, 0x47 },
2668 { 0x01, 0x68, 0x48 },
2669 { 0x01, 0x69, 0x49 },
2670 { 0x01, 0x6a, 0x4a },
2671 { 0x01, 0x6b, 0x4b },
2672 { 0x01, 0x6c, 0x4c },
2673 { 0x01, 0x6d, 0x4d },
2674 { 0x01, 0x6e, 0x4e },
2675 { 0x01, 0x6f, 0x4f },
2676 { 0x01, 0x70, 0x50 },
2677 { 0x01, 0x71, 0x51 },
2678 { 0x01, 0x72, 0x52 },
2679 { 0x01, 0x73, 0x53 },
2680 { 0x01, 0x74, 0x54 },
2681 { 0x01, 0x75, 0x55 },
2682 { 0x01, 0x76, 0x56 },
2683 { 0x01, 0x77, 0x57 },
2684 { 0x01, 0x78, 0x58 },
2685 { 0x01, 0x79, 0x59 },
2686 { 0x01, 0x7a, 0x5a },
2687 { 0x00, 0x5b, 0x5b },
2688 { 0x00, 0x5c, 0x5c },
2689 { 0x00, 0x5d, 0x5d },
2690 { 0x00, 0x5e, 0x5e },
2691 { 0x00, 0x5f, 0x5f },
2692 { 0x00, 0x60, 0x60 },
2693 { 0x00, 0x61, 0x41 },
2694 { 0x00, 0x62, 0x42 },
2695 { 0x00, 0x63, 0x43 },
2696 { 0x00, 0x64, 0x44 },
2697 { 0x00, 0x65, 0x45 },
2698 { 0x00, 0x66, 0x46 },
2699 { 0x00, 0x67, 0x47 },
2700 { 0x00, 0x68, 0x48 },
2701 { 0x00, 0x69, 0x49 },
2702 { 0x00, 0x6a, 0x4a },
2703 { 0x00, 0x6b, 0x4b },
2704 { 0x00, 0x6c, 0x4c },
2705 { 0x00, 0x6d, 0x4d },
2706 { 0x00, 0x6e, 0x4e },
2707 { 0x00, 0x6f, 0x4f },
2708 { 0x00, 0x70, 0x50 },
2709 { 0x00, 0x71, 0x51 },
2710 { 0x00, 0x72, 0x52 },
2711 { 0x00, 0x73, 0x53 },
2712 { 0x00, 0x74, 0x54 },
2713 { 0x00, 0x75, 0x55 },
2714 { 0x00, 0x76, 0x56 },
2715 { 0x00, 0x77, 0x57 },
2716 { 0x00, 0x78, 0x58 },
2717 { 0x00, 0x79, 0x59 },
2718 { 0x00, 0x7a, 0x5a },
2719 { 0x00, 0x7b, 0x7b },
2720 { 0x00, 0x7c, 0x7c },
2721 { 0x00, 0x7d, 0x7d },
2722 { 0x00, 0x7e, 0x7e },
2723 { 0x00, 0x7f, 0x7f },
2724 { 0x00, 0x80, 0x80 },
2725 { 0x00, 0x81, 0x81 },
2726 { 0x00, 0x82, 0x82 },
2727 { 0x00, 0x83, 0x83 },
2728 { 0x00, 0x84, 0x84 },
2729 { 0x00, 0x85, 0x85 },
2730 { 0x00, 0x86, 0x86 },
2731 { 0x00, 0x87, 0x87 },
2732 { 0x00, 0x88, 0x88 },
2733 { 0x00, 0x89, 0x89 },
2734 { 0x00, 0x8a, 0x8a },
2735 { 0x00, 0x8b, 0x8b },
2736 { 0x00, 0x8c, 0x8c },
2737 { 0x00, 0x8d, 0x8d },
2738 { 0x00, 0x8e, 0x8e },
2739 { 0x00, 0x8f, 0x8f },
2740 { 0x00, 0x90, 0x90 },
2741 { 0x00, 0x91, 0x91 },
2742 { 0x00, 0x92, 0x92 },
2743 { 0x00, 0x93, 0x93 },
2744 { 0x00, 0x94, 0x94 },
2745 { 0x00, 0x95, 0x95 },
2746 { 0x00, 0x96, 0x96 },
2747 { 0x00, 0x97, 0x97 },
2748 { 0x00, 0x98, 0x98 },
2749 { 0x00, 0x99, 0x99 },
2750 { 0x00, 0x9a, 0x9a },
2751 { 0x00, 0x9b, 0x9b },
2752 { 0x00, 0x9c, 0x9c },
2753 { 0x00, 0x9d, 0x9d },
2754 { 0x00, 0x9e, 0x9e },
2755 { 0x00, 0x9f, 0x9f },
2756 { 0x00, 0xa0, 0xa0 },
2757 { 0x00, 0xa1, 0xa1 },
2758 { 0x00, 0xa2, 0xa2 },
2759 { 0x00, 0xa3, 0xa3 },
2760 { 0x00, 0xa4, 0xa4 },
2761 { 0x00, 0xa5, 0xa5 },
2762 { 0x00, 0xa6, 0xa6 },
2763 { 0x00, 0xa7, 0xa7 },
2764 { 0x00, 0xa8, 0xa8 },
2765 { 0x00, 0xa9, 0xa9 },
2766 { 0x00, 0xaa, 0xaa },
2767 { 0x00, 0xab, 0xab },
2768 { 0x00, 0xac, 0xac },
2769 { 0x00, 0xad, 0xad },
2770 { 0x00, 0xae, 0xae },
2771 { 0x00, 0xaf, 0xaf },
2772 { 0x00, 0xb0, 0xb0 },
2773 { 0x00, 0xb1, 0xb1 },
2774 { 0x00, 0xb2, 0xb2 },
2775 { 0x00, 0xb3, 0xb3 },
2776 { 0x00, 0xb4, 0xb4 },
2777 { 0x00, 0xb5, 0xb5 },
2778 { 0x00, 0xb6, 0xb6 },
2779 { 0x00, 0xb7, 0xb7 },
2780 { 0x00, 0xb8, 0xb8 },
2781 { 0x00, 0xb9, 0xb9 },
2782 { 0x00, 0xba, 0xba },
2783 { 0x00, 0xbb, 0xbb },
2784 { 0x00, 0xbc, 0xbc },
2785 { 0x00, 0xbd, 0xbd },
2786 { 0x00, 0xbe, 0xbe },
2787 { 0x00, 0xbf, 0xbf },
2788 { 0x00, 0xc0, 0xc0 },
2789 { 0x00, 0xc1, 0xc1 },
2790 { 0x00, 0xc2, 0xc2 },
2791 { 0x00, 0xc3, 0xc3 },
2792 { 0x00, 0xc4, 0xc4 },
2793 { 0x00, 0xc5, 0xc5 },
2794 { 0x00, 0xc6, 0xc6 },
2795 { 0x00, 0xc7, 0xc7 },
2796 { 0x00, 0xc8, 0xc8 },
2797 { 0x00, 0xc9, 0xc9 },
2798 { 0x00, 0xca, 0xca },
2799 { 0x00, 0xcb, 0xcb },
2800 { 0x00, 0xcc, 0xcc },
2801 { 0x00, 0xcd, 0xcd },
2802 { 0x00, 0xce, 0xce },
2803 { 0x00, 0xcf, 0xcf },
2804 { 0x00, 0xd0, 0xd0 },
2805 { 0x00, 0xd1, 0xd1 },
2806 { 0x00, 0xd2, 0xd2 },
2807 { 0x00, 0xd3, 0xd3 },
2808 { 0x00, 0xd4, 0xd4 },
2809 { 0x00, 0xd5, 0xd5 },
2810 { 0x00, 0xd6, 0xd6 },
2811 { 0x00, 0xd7, 0xd7 },
2812 { 0x00, 0xd8, 0xd8 },
2813 { 0x00, 0xd9, 0xd9 },
2814 { 0x00, 0xda, 0xda },
2815 { 0x00, 0xdb, 0xdb },
2816 { 0x00, 0xdc, 0xdc },
2817 { 0x00, 0xdd, 0xdd },
2818 { 0x00, 0xde, 0xde },
2819 { 0x00, 0xdf, 0xdf },
2820 { 0x00, 0xe0, 0xe0 },
2821 { 0x00, 0xe1, 0xe1 },
2822 { 0x00, 0xe2, 0xe2 },
2823 { 0x00, 0xe3, 0xe3 },
2824 { 0x00, 0xe4, 0xe4 },
2825 { 0x00, 0xe5, 0xe5 },
2826 { 0x00, 0xe6, 0xe6 },
2827 { 0x00, 0xe7, 0xe7 },
2828 { 0x00, 0xe8, 0xe8 },
2829 { 0x00, 0xe9, 0xe9 },
2830 { 0x00, 0xea, 0xea },
2831 { 0x00, 0xeb, 0xeb },
2832 { 0x00, 0xec, 0xec },
2833 { 0x00, 0xed, 0xed },
2834 { 0x00, 0xee, 0xee },
2835 { 0x00, 0xef, 0xef },
2836 { 0x00, 0xf0, 0xf0 },
2837 { 0x00, 0xf1, 0xf1 },
2838 { 0x00, 0xf2, 0xf2 },
2839 { 0x00, 0xf3, 0xf3 },
2840 { 0x00, 0xf4, 0xf4 },
2841 { 0x00, 0xf5, 0xf5 },
2842 { 0x00, 0xf6, 0xf6 },
2843 { 0x00, 0xf7, 0xf7 },
2844 { 0x00, 0xf8, 0xf8 },
2845 { 0x00, 0xf9, 0xf9 },
2846 { 0x00, 0xfa, 0xfa },
2847 { 0x00, 0xfb, 0xfb },
2848 { 0x00, 0xfc, 0xfc },
2849 { 0x00, 0xfd, 0xfd },
2850 { 0x00, 0xfe, 0xfe },
2851 { 0x00, 0xff, 0xff }
2854 struct cs_info iso9_tbl[] = {
2855 { 0x00, 0x00, 0x00 },
2856 { 0x00, 0x01, 0x01 },
2857 { 0x00, 0x02, 0x02 },
2858 { 0x00, 0x03, 0x03 },
2859 { 0x00, 0x04, 0x04 },
2860 { 0x00, 0x05, 0x05 },
2861 { 0x00, 0x06, 0x06 },
2862 { 0x00, 0x07, 0x07 },
2863 { 0x00, 0x08, 0x08 },
2864 { 0x00, 0x09, 0x09 },
2865 { 0x00, 0x0a, 0x0a },
2866 { 0x00, 0x0b, 0x0b },
2867 { 0x00, 0x0c, 0x0c },
2868 { 0x00, 0x0d, 0x0d },
2869 { 0x00, 0x0e, 0x0e },
2870 { 0x00, 0x0f, 0x0f },
2871 { 0x00, 0x10, 0x10 },
2872 { 0x00, 0x11, 0x11 },
2873 { 0x00, 0x12, 0x12 },
2874 { 0x00, 0x13, 0x13 },
2875 { 0x00, 0x14, 0x14 },
2876 { 0x00, 0x15, 0x15 },
2877 { 0x00, 0x16, 0x16 },
2878 { 0x00, 0x17, 0x17 },
2879 { 0x00, 0x18, 0x18 },
2880 { 0x00, 0x19, 0x19 },
2881 { 0x00, 0x1a, 0x1a },
2882 { 0x00, 0x1b, 0x1b },
2883 { 0x00, 0x1c, 0x1c },
2884 { 0x00, 0x1d, 0x1d },
2885 { 0x00, 0x1e, 0x1e },
2886 { 0x00, 0x1f, 0x1f },
2887 { 0x00, 0x20, 0x20 },
2888 { 0x00, 0x21, 0x21 },
2889 { 0x00, 0x22, 0x22 },
2890 { 0x00, 0x23, 0x23 },
2891 { 0x00, 0x24, 0x24 },
2892 { 0x00, 0x25, 0x25 },
2893 { 0x00, 0x26, 0x26 },
2894 { 0x00, 0x27, 0x27 },
2895 { 0x00, 0x28, 0x28 },
2896 { 0x00, 0x29, 0x29 },
2897 { 0x00, 0x2a, 0x2a },
2898 { 0x00, 0x2b, 0x2b },
2899 { 0x00, 0x2c, 0x2c },
2900 { 0x00, 0x2d, 0x2d },
2901 { 0x00, 0x2e, 0x2e },
2902 { 0x00, 0x2f, 0x2f },
2903 { 0x00, 0x30, 0x30 },
2904 { 0x00, 0x31, 0x31 },
2905 { 0x00, 0x32, 0x32 },
2906 { 0x00, 0x33, 0x33 },
2907 { 0x00, 0x34, 0x34 },
2908 { 0x00, 0x35, 0x35 },
2909 { 0x00, 0x36, 0x36 },
2910 { 0x00, 0x37, 0x37 },
2911 { 0x00, 0x38, 0x38 },
2912 { 0x00, 0x39, 0x39 },
2913 { 0x00, 0x3a, 0x3a },
2914 { 0x00, 0x3b, 0x3b },
2915 { 0x00, 0x3c, 0x3c },
2916 { 0x00, 0x3d, 0x3d },
2917 { 0x00, 0x3e, 0x3e },
2918 { 0x00, 0x3f, 0x3f },
2919 { 0x00, 0x40, 0x40 },
2920 { 0x01, 0x61, 0x41 },
2921 { 0x01, 0x62, 0x42 },
2922 { 0x01, 0x63, 0x43 },
2923 { 0x01, 0x64, 0x44 },
2924 { 0x01, 0x65, 0x45 },
2925 { 0x01, 0x66, 0x46 },
2926 { 0x01, 0x67, 0x47 },
2927 { 0x01, 0x68, 0x48 },
2928 { 0x01, 0xfd, 0x49 },
2929 { 0x01, 0x6a, 0x4a },
2930 { 0x01, 0x6b, 0x4b },
2931 { 0x01, 0x6c, 0x4c },
2932 { 0x01, 0x6d, 0x4d },
2933 { 0x01, 0x6e, 0x4e },
2934 { 0x01, 0x6f, 0x4f },
2935 { 0x01, 0x70, 0x50 },
2936 { 0x01, 0x71, 0x51 },
2937 { 0x01, 0x72, 0x52 },
2938 { 0x01, 0x73, 0x53 },
2939 { 0x01, 0x74, 0x54 },
2940 { 0x01, 0x75, 0x55 },
2941 { 0x01, 0x76, 0x56 },
2942 { 0x01, 0x77, 0x57 },
2943 { 0x01, 0x78, 0x58 },
2944 { 0x01, 0x79, 0x59 },
2945 { 0x01, 0x7a, 0x5a },
2946 { 0x00, 0x5b, 0x5b },
2947 { 0x00, 0x5c, 0x5c },
2948 { 0x00, 0x5d, 0x5d },
2949 { 0x00, 0x5e, 0x5e },
2950 { 0x00, 0x5f, 0x5f },
2951 { 0x00, 0x60, 0x60 },
2952 { 0x00, 0x61, 0x41 },
2953 { 0x00, 0x62, 0x42 },
2954 { 0x00, 0x63, 0x43 },
2955 { 0x00, 0x64, 0x44 },
2956 { 0x00, 0x65, 0x45 },
2957 { 0x00, 0x66, 0x46 },
2958 { 0x00, 0x67, 0x47 },
2959 { 0x00, 0x68, 0x48 },
2960 { 0x00, 0x69, 0xdd },
2961 { 0x00, 0x6a, 0x4a },
2962 { 0x00, 0x6b, 0x4b },
2963 { 0x00, 0x6c, 0x4c },
2964 { 0x00, 0x6d, 0x4d },
2965 { 0x00, 0x6e, 0x4e },
2966 { 0x00, 0x6f, 0x4f },
2967 { 0x00, 0x70, 0x50 },
2968 { 0x00, 0x71, 0x51 },
2969 { 0x00, 0x72, 0x52 },
2970 { 0x00, 0x73, 0x53 },
2971 { 0x00, 0x74, 0x54 },
2972 { 0x00, 0x75, 0x55 },
2973 { 0x00, 0x76, 0x56 },
2974 { 0x00, 0x77, 0x57 },
2975 { 0x00, 0x78, 0x58 },
2976 { 0x00, 0x79, 0x59 },
2977 { 0x00, 0x7a, 0x5a },
2978 { 0x00, 0x7b, 0x7b },
2979 { 0x00, 0x7c, 0x7c },
2980 { 0x00, 0x7d, 0x7d },
2981 { 0x00, 0x7e, 0x7e },
2982 { 0x00, 0x7f, 0x7f },
2983 { 0x00, 0x80, 0x80 },
2984 { 0x00, 0x81, 0x81 },
2985 { 0x00, 0x82, 0x82 },
2986 { 0x00, 0x83, 0x83 },
2987 { 0x00, 0x84, 0x84 },
2988 { 0x00, 0x85, 0x85 },
2989 { 0x00, 0x86, 0x86 },
2990 { 0x00, 0x87, 0x87 },
2991 { 0x00, 0x88, 0x88 },
2992 { 0x00, 0x89, 0x89 },
2993 { 0x00, 0x8a, 0x8a },
2994 { 0x00, 0x8b, 0x8b },
2995 { 0x00, 0x8c, 0x8c },
2996 { 0x00, 0x8d, 0x8d },
2997 { 0x00, 0x8e, 0x8e },
2998 { 0x00, 0x8f, 0x8f },
2999 { 0x00, 0x90, 0x90 },
3000 { 0x00, 0x91, 0x91 },
3001 { 0x00, 0x92, 0x92 },
3002 { 0x00, 0x93, 0x93 },
3003 { 0x00, 0x94, 0x94 },
3004 { 0x00, 0x95, 0x95 },
3005 { 0x00, 0x96, 0x96 },
3006 { 0x00, 0x97, 0x97 },
3007 { 0x00, 0x98, 0x98 },
3008 { 0x00, 0x99, 0x99 },
3009 { 0x00, 0x9a, 0x9a },
3010 { 0x00, 0x9b, 0x9b },
3011 { 0x00, 0x9c, 0x9c },
3012 { 0x00, 0x9d, 0x9d },
3013 { 0x00, 0x9e, 0x9e },
3014 { 0x00, 0x9f, 0x9f },
3015 { 0x00, 0xa0, 0xa0 },
3016 { 0x00, 0xa1, 0xa1 },
3017 { 0x00, 0xa2, 0xa2 },
3018 { 0x00, 0xa3, 0xa3 },
3019 { 0x00, 0xa4, 0xa4 },
3020 { 0x00, 0xa5, 0xa5 },
3021 { 0x00, 0xa6, 0xa6 },
3022 { 0x00, 0xa7, 0xa7 },
3023 { 0x00, 0xa8, 0xa8 },
3024 { 0x00, 0xa9, 0xa9 },
3025 { 0x00, 0xaa, 0xaa },
3026 { 0x00, 0xab, 0xab },
3027 { 0x00, 0xac, 0xac },
3028 { 0x00, 0xad, 0xad },
3029 { 0x00, 0xae, 0xae },
3030 { 0x00, 0xaf, 0xaf },
3031 { 0x00, 0xb0, 0xb0 },
3032 { 0x00, 0xb1, 0xb1 },
3033 { 0x00, 0xb2, 0xb2 },
3034 { 0x00, 0xb3, 0xb3 },
3035 { 0x00, 0xb4, 0xb4 },
3036 { 0x00, 0xb5, 0xb5 },
3037 { 0x00, 0xb6, 0xb6 },
3038 { 0x00, 0xb7, 0xb7 },
3039 { 0x00, 0xb8, 0xb8 },
3040 { 0x00, 0xb9, 0xb9 },
3041 { 0x00, 0xba, 0xba },
3042 { 0x00, 0xbb, 0xbb },
3043 { 0x00, 0xbc, 0xbc },
3044 { 0x00, 0xbd, 0xbd },
3045 { 0x00, 0xbe, 0xbe },
3046 { 0x00, 0xbf, 0xbf },
3047 { 0x01, 0xe0, 0xc0 },
3048 { 0x01, 0xe1, 0xc1 },
3049 { 0x01, 0xe2, 0xc2 },
3050 { 0x01, 0xe3, 0xc3 },
3051 { 0x01, 0xe4, 0xc4 },
3052 { 0x01, 0xe5, 0xc5 },
3053 { 0x01, 0xe6, 0xc6 },
3054 { 0x01, 0xe7, 0xc7 },
3055 { 0x01, 0xe8, 0xc8 },
3056 { 0x01, 0xe9, 0xc9 },
3057 { 0x01, 0xea, 0xca },
3058 { 0x01, 0xeb, 0xcb },
3059 { 0x01, 0xec, 0xcc },
3060 { 0x01, 0xed, 0xcd },
3061 { 0x01, 0xee, 0xce },
3062 { 0x01, 0xef, 0xcf },
3063 { 0x01, 0xf0, 0xd0 },
3064 { 0x01, 0xf1, 0xd1 },
3065 { 0x01, 0xf2, 0xd2 },
3066 { 0x01, 0xf3, 0xd3 },
3067 { 0x01, 0xf4, 0xd4 },
3068 { 0x01, 0xf5, 0xd5 },
3069 { 0x01, 0xf6, 0xd6 },
3070 { 0x00, 0xd7, 0xd7 },
3071 { 0x01, 0xf8, 0xd8 },
3072 { 0x01, 0xf9, 0xd9 },
3073 { 0x01, 0xfa, 0xda },
3074 { 0x01, 0xfb, 0xdb },
3075 { 0x01, 0xfc, 0xdc },
3076 { 0x01, 0x69, 0xdd },
3077 { 0x01, 0xfe, 0xde },
3078 { 0x00, 0xdf, 0xdf },
3079 { 0x00, 0xe0, 0xc0 },
3080 { 0x00, 0xe1, 0xc1 },
3081 { 0x00, 0xe2, 0xc2 },
3082 { 0x00, 0xe3, 0xc3 },
3083 { 0x00, 0xe4, 0xc4 },
3084 { 0x00, 0xe5, 0xc5 },
3085 { 0x00, 0xe6, 0xc6 },
3086 { 0x00, 0xe7, 0xc7 },
3087 { 0x00, 0xe8, 0xc8 },
3088 { 0x00, 0xe9, 0xc9 },
3089 { 0x00, 0xea, 0xca },
3090 { 0x00, 0xeb, 0xcb },
3091 { 0x00, 0xec, 0xcc },
3092 { 0x00, 0xed, 0xcd },
3093 { 0x00, 0xee, 0xce },
3094 { 0x00, 0xef, 0xcf },
3095 { 0x00, 0xf0, 0xd0 },
3096 { 0x00, 0xf1, 0xd1 },
3097 { 0x00, 0xf2, 0xd2 },
3098 { 0x00, 0xf3, 0xd3 },
3099 { 0x00, 0xf4, 0xd4 },
3100 { 0x00, 0xf5, 0xd5 },
3101 { 0x00, 0xf6, 0xd6 },
3102 { 0x00, 0xf7, 0xf7 },
3103 { 0x00, 0xf8, 0xd8 },
3104 { 0x00, 0xf9, 0xd9 },
3105 { 0x00, 0xfa, 0xda },
3106 { 0x00, 0xfb, 0xdb },
3107 { 0x00, 0xfc, 0xdc },
3108 { 0x00, 0xfd, 0x49 },
3109 { 0x00, 0xfe, 0xde },
3110 { 0x00, 0xff, 0xff }
3113 struct cs_info iso10_tbl[] = {
3114 { 0x00, 0x00, 0x00 },
3115 { 0x00, 0x01, 0x01 },
3116 { 0x00, 0x02, 0x02 },
3117 { 0x00, 0x03, 0x03 },
3118 { 0x00, 0x04, 0x04 },
3119 { 0x00, 0x05, 0x05 },
3120 { 0x00, 0x06, 0x06 },
3121 { 0x00, 0x07, 0x07 },
3122 { 0x00, 0x08, 0x08 },
3123 { 0x00, 0x09, 0x09 },
3124 { 0x00, 0x0a, 0x0a },
3125 { 0x00, 0x0b, 0x0b },
3126 { 0x00, 0x0c, 0x0c },
3127 { 0x00, 0x0d, 0x0d },
3128 { 0x00, 0x0e, 0x0e },
3129 { 0x00, 0x0f, 0x0f },
3130 { 0x00, 0x10, 0x10 },
3131 { 0x00, 0x11, 0x11 },
3132 { 0x00, 0x12, 0x12 },
3133 { 0x00, 0x13, 0x13 },
3134 { 0x00, 0x14, 0x14 },
3135 { 0x00, 0x15, 0x15 },
3136 { 0x00, 0x16, 0x16 },
3137 { 0x00, 0x17, 0x17 },
3138 { 0x00, 0x18, 0x18 },
3139 { 0x00, 0x19, 0x19 },
3140 { 0x00, 0x1a, 0x1a },
3141 { 0x00, 0x1b, 0x1b },
3142 { 0x00, 0x1c, 0x1c },
3143 { 0x00, 0x1d, 0x1d },
3144 { 0x00, 0x1e, 0x1e },
3145 { 0x00, 0x1f, 0x1f },
3146 { 0x00, 0x20, 0x20 },
3147 { 0x00, 0x21, 0x21 },
3148 { 0x00, 0x22, 0x22 },
3149 { 0x00, 0x23, 0x23 },
3150 { 0x00, 0x24, 0x24 },
3151 { 0x00, 0x25, 0x25 },
3152 { 0x00, 0x26, 0x26 },
3153 { 0x00, 0x27, 0x27 },
3154 { 0x00, 0x28, 0x28 },
3155 { 0x00, 0x29, 0x29 },
3156 { 0x00, 0x2a, 0x2a },
3157 { 0x00, 0x2b, 0x2b },
3158 { 0x00, 0x2c, 0x2c },
3159 { 0x00, 0x2d, 0x2d },
3160 { 0x00, 0x2e, 0x2e },
3161 { 0x00, 0x2f, 0x2f },
3162 { 0x00, 0x30, 0x30 },
3163 { 0x00, 0x31, 0x31 },
3164 { 0x00, 0x32, 0x32 },
3165 { 0x00, 0x33, 0x33 },
3166 { 0x00, 0x34, 0x34 },
3167 { 0x00, 0x35, 0x35 },
3168 { 0x00, 0x36, 0x36 },
3169 { 0x00, 0x37, 0x37 },
3170 { 0x00, 0x38, 0x38 },
3171 { 0x00, 0x39, 0x39 },
3172 { 0x00, 0x3a, 0x3a },
3173 { 0x00, 0x3b, 0x3b },
3174 { 0x00, 0x3c, 0x3c },
3175 { 0x00, 0x3d, 0x3d },
3176 { 0x00, 0x3e, 0x3e },
3177 { 0x00, 0x3f, 0x3f },
3178 { 0x00, 0x40, 0x40 },
3179 { 0x01, 0x61, 0x41 },
3180 { 0x01, 0x62, 0x42 },
3181 { 0x01, 0x63, 0x43 },
3182 { 0x01, 0x64, 0x44 },
3183 { 0x01, 0x65, 0x45 },
3184 { 0x01, 0x66, 0x46 },
3185 { 0x01, 0x67, 0x47 },
3186 { 0x01, 0x68, 0x48 },
3187 { 0x01, 0x69, 0x49 },
3188 { 0x01, 0x6a, 0x4a },
3189 { 0x01, 0x6b, 0x4b },
3190 { 0x01, 0x6c, 0x4c },
3191 { 0x01, 0x6d, 0x4d },
3192 { 0x01, 0x6e, 0x4e },
3193 { 0x01, 0x6f, 0x4f },
3194 { 0x01, 0x70, 0x50 },
3195 { 0x01, 0x71, 0x51 },
3196 { 0x01, 0x72, 0x52 },
3197 { 0x01, 0x73, 0x53 },
3198 { 0x01, 0x74, 0x54 },
3199 { 0x01, 0x75, 0x55 },
3200 { 0x01, 0x76, 0x56 },
3201 { 0x01, 0x77, 0x57 },
3202 { 0x01, 0x78, 0x58 },
3203 { 0x01, 0x79, 0x59 },
3204 { 0x01, 0x7a, 0x5a },
3205 { 0x00, 0x5b, 0x5b },
3206 { 0x00, 0x5c, 0x5c },
3207 { 0x00, 0x5d, 0x5d },
3208 { 0x00, 0x5e, 0x5e },
3209 { 0x00, 0x5f, 0x5f },
3210 { 0x00, 0x60, 0x60 },
3211 { 0x00, 0x61, 0x41 },
3212 { 0x00, 0x62, 0x42 },
3213 { 0x00, 0x63, 0x43 },
3214 { 0x00, 0x64, 0x44 },
3215 { 0x00, 0x65, 0x45 },
3216 { 0x00, 0x66, 0x46 },
3217 { 0x00, 0x67, 0x47 },
3218 { 0x00, 0x68, 0x48 },
3219 { 0x00, 0x69, 0x49 },
3220 { 0x00, 0x6a, 0x4a },
3221 { 0x00, 0x6b, 0x4b },
3222 { 0x00, 0x6c, 0x4c },
3223 { 0x00, 0x6d, 0x4d },
3224 { 0x00, 0x6e, 0x4e },
3225 { 0x00, 0x6f, 0x4f },
3226 { 0x00, 0x70, 0x50 },
3227 { 0x00, 0x71, 0x51 },
3228 { 0x00, 0x72, 0x52 },
3229 { 0x00, 0x73, 0x53 },
3230 { 0x00, 0x74, 0x54 },
3231 { 0x00, 0x75, 0x55 },
3232 { 0x00, 0x76, 0x56 },
3233 { 0x00, 0x77, 0x57 },
3234 { 0x00, 0x78, 0x58 },
3235 { 0x00, 0x79, 0x59 },
3236 { 0x00, 0x7a, 0x5a },
3237 { 0x00, 0x7b, 0x7b },
3238 { 0x00, 0x7c, 0x7c },
3239 { 0x00, 0x7d, 0x7d },
3240 { 0x00, 0x7e, 0x7e },
3241 { 0x00, 0x7f, 0x7f },
3242 { 0x00, 0x80, 0x80 },
3243 { 0x00, 0x81, 0x81 },
3244 { 0x00, 0x82, 0x82 },
3245 { 0x00, 0x83, 0x83 },
3246 { 0x00, 0x84, 0x84 },
3247 { 0x00, 0x85, 0x85 },
3248 { 0x00, 0x86, 0x86 },
3249 { 0x00, 0x87, 0x87 },
3250 { 0x00, 0x88, 0x88 },
3251 { 0x00, 0x89, 0x89 },
3252 { 0x00, 0x8a, 0x8a },
3253 { 0x00, 0x8b, 0x8b },
3254 { 0x00, 0x8c, 0x8c },
3255 { 0x00, 0x8d, 0x8d },
3256 { 0x00, 0x8e, 0x8e },
3257 { 0x00, 0x8f, 0x8f },
3258 { 0x00, 0x90, 0x90 },
3259 { 0x00, 0x91, 0x91 },
3260 { 0x00, 0x92, 0x92 },
3261 { 0x00, 0x93, 0x93 },
3262 { 0x00, 0x94, 0x94 },
3263 { 0x00, 0x95, 0x95 },
3264 { 0x00, 0x96, 0x96 },
3265 { 0x00, 0x97, 0x97 },
3266 { 0x00, 0x98, 0x98 },
3267 { 0x00, 0x99, 0x99 },
3268 { 0x00, 0x9a, 0x9a },
3269 { 0x00, 0x9b, 0x9b },
3270 { 0x00, 0x9c, 0x9c },
3271 { 0x00, 0x9d, 0x9d },
3272 { 0x00, 0x9e, 0x9e },
3273 { 0x00, 0x9f, 0x9f },
3274 { 0x00, 0xa0, 0xa0 },
3275 { 0x00, 0xa1, 0xa1 },
3276 { 0x00, 0xa2, 0xa2 },
3277 { 0x00, 0xa3, 0xa3 },
3278 { 0x00, 0xa4, 0xa4 },
3279 { 0x00, 0xa5, 0xa5 },
3280 { 0x00, 0xa6, 0xa6 },
3281 { 0x00, 0xa7, 0xa7 },
3282 { 0x00, 0xa8, 0xa8 },
3283 { 0x00, 0xa9, 0xa9 },
3284 { 0x00, 0xaa, 0xaa },
3285 { 0x00, 0xab, 0xab },
3286 { 0x00, 0xac, 0xac },
3287 { 0x00, 0xad, 0xad },
3288 { 0x00, 0xae, 0xae },
3289 { 0x00, 0xaf, 0xaf },
3290 { 0x00, 0xb0, 0xb0 },
3291 { 0x00, 0xb1, 0xb1 },
3292 { 0x00, 0xb2, 0xb2 },
3293 { 0x00, 0xb3, 0xb3 },
3294 { 0x00, 0xb4, 0xb4 },
3295 { 0x00, 0xb5, 0xb5 },
3296 { 0x00, 0xb6, 0xb6 },
3297 { 0x00, 0xb7, 0xb7 },
3298 { 0x00, 0xb8, 0xb8 },
3299 { 0x00, 0xb9, 0xb9 },
3300 { 0x00, 0xba, 0xba },
3301 { 0x00, 0xbb, 0xbb },
3302 { 0x00, 0xbc, 0xbc },
3303 { 0x00, 0xbd, 0xbd },
3304 { 0x00, 0xbe, 0xbe },
3305 { 0x00, 0xbf, 0xbf },
3306 { 0x00, 0xc0, 0xc0 },
3307 { 0x00, 0xc1, 0xc1 },
3308 { 0x00, 0xc2, 0xc2 },
3309 { 0x00, 0xc3, 0xc3 },
3310 { 0x00, 0xc4, 0xc4 },
3311 { 0x00, 0xc5, 0xc5 },
3312 { 0x00, 0xc6, 0xc6 },
3313 { 0x00, 0xc7, 0xc7 },
3314 { 0x00, 0xc8, 0xc8 },
3315 { 0x00, 0xc9, 0xc9 },
3316 { 0x00, 0xca, 0xca },
3317 { 0x00, 0xcb, 0xcb },
3318 { 0x00, 0xcc, 0xcc },
3319 { 0x00, 0xcd, 0xcd },
3320 { 0x00, 0xce, 0xce },
3321 { 0x00, 0xcf, 0xcf },
3322 { 0x00, 0xd0, 0xd0 },
3323 { 0x00, 0xd1, 0xd1 },
3324 { 0x00, 0xd2, 0xd2 },
3325 { 0x00, 0xd3, 0xd3 },
3326 { 0x00, 0xd4, 0xd4 },
3327 { 0x00, 0xd5, 0xd5 },
3328 { 0x00, 0xd6, 0xd6 },
3329 { 0x00, 0xd7, 0xd7 },
3330 { 0x00, 0xd8, 0xd8 },
3331 { 0x00, 0xd9, 0xd9 },
3332 { 0x00, 0xda, 0xda },
3333 { 0x00, 0xdb, 0xdb },
3334 { 0x00, 0xdc, 0xdc },
3335 { 0x00, 0xdd, 0xdd },
3336 { 0x00, 0xde, 0xde },
3337 { 0x00, 0xdf, 0xdf },
3338 { 0x00, 0xe0, 0xe0 },
3339 { 0x00, 0xe1, 0xe1 },
3340 { 0x00, 0xe2, 0xe2 },
3341 { 0x00, 0xe3, 0xe3 },
3342 { 0x00, 0xe4, 0xe4 },
3343 { 0x00, 0xe5, 0xe5 },
3344 { 0x00, 0xe6, 0xe6 },
3345 { 0x00, 0xe7, 0xe7 },
3346 { 0x00, 0xe8, 0xe8 },
3347 { 0x00, 0xe9, 0xe9 },
3348 { 0x00, 0xea, 0xea },
3349 { 0x00, 0xeb, 0xeb },
3350 { 0x00, 0xec, 0xec },
3351 { 0x00, 0xed, 0xed },
3352 { 0x00, 0xee, 0xee },
3353 { 0x00, 0xef, 0xef },
3354 { 0x00, 0xf0, 0xf0 },
3355 { 0x00, 0xf1, 0xf1 },
3356 { 0x00, 0xf2, 0xf2 },
3357 { 0x00, 0xf3, 0xf3 },
3358 { 0x00, 0xf4, 0xf4 },
3359 { 0x00, 0xf5, 0xf5 },
3360 { 0x00, 0xf6, 0xf6 },
3361 { 0x00, 0xf7, 0xf7 },
3362 { 0x00, 0xf8, 0xf8 },
3363 { 0x00, 0xf9, 0xf9 },
3364 { 0x00, 0xfa, 0xfa },
3365 { 0x00, 0xfb, 0xfb },
3366 { 0x00, 0xfc, 0xfc },
3367 { 0x00, 0xfd, 0xfd },
3368 { 0x00, 0xfe, 0xfe },
3369 { 0x00, 0xff, 0xff }
3372 struct cs_info koi8r_tbl[] = {
3373 { 0x00, 0x00, 0x00 },
3374 { 0x00, 0x01, 0x01 },
3375 { 0x00, 0x02, 0x02 },
3376 { 0x00, 0x03, 0x03 },
3377 { 0x00, 0x04, 0x04 },
3378 { 0x00, 0x05, 0x05 },
3379 { 0x00, 0x06, 0x06 },
3380 { 0x00, 0x07, 0x07 },
3381 { 0x00, 0x08, 0x08 },
3382 { 0x00, 0x09, 0x09 },
3383 { 0x00, 0x0a, 0x0a },
3384 { 0x00, 0x0b, 0x0b },
3385 { 0x00, 0x0c, 0x0c },
3386 { 0x00, 0x0d, 0x0d },
3387 { 0x00, 0x0e, 0x0e },
3388 { 0x00, 0x0f, 0x0f },
3389 { 0x00, 0x10, 0x10 },
3390 { 0x00, 0x11, 0x11 },
3391 { 0x00, 0x12, 0x12 },
3392 { 0x00, 0x13, 0x13 },
3393 { 0x00, 0x14, 0x14 },
3394 { 0x00, 0x15, 0x15 },
3395 { 0x00, 0x16, 0x16 },
3396 { 0x00, 0x17, 0x17 },
3397 { 0x00, 0x18, 0x18 },
3398 { 0x00, 0x19, 0x19 },
3399 { 0x00, 0x1a, 0x1a },
3400 { 0x00, 0x1b, 0x1b },
3401 { 0x00, 0x1c, 0x1c },
3402 { 0x00, 0x1d, 0x1d },
3403 { 0x00, 0x1e, 0x1e },
3404 { 0x00, 0x1f, 0x1f },
3405 { 0x00, 0x20, 0x20 },
3406 { 0x00, 0x21, 0x21 },
3407 { 0x00, 0x22, 0x22 },
3408 { 0x00, 0x23, 0x23 },
3409 { 0x00, 0x24, 0x24 },
3410 { 0x00, 0x25, 0x25 },
3411 { 0x00, 0x26, 0x26 },
3412 { 0x00, 0x27, 0x27 },
3413 { 0x00, 0x28, 0x28 },
3414 { 0x00, 0x29, 0x29 },
3415 { 0x00, 0x2a, 0x2a },
3416 { 0x00, 0x2b, 0x2b },
3417 { 0x00, 0x2c, 0x2c },
3418 { 0x00, 0x2d, 0x2d },
3419 { 0x00, 0x2e, 0x2e },
3420 { 0x00, 0x2f, 0x2f },
3421 { 0x00, 0x30, 0x30 },
3422 { 0x00, 0x31, 0x31 },
3423 { 0x00, 0x32, 0x32 },
3424 { 0x00, 0x33, 0x33 },
3425 { 0x00, 0x34, 0x34 },
3426 { 0x00, 0x35, 0x35 },
3427 { 0x00, 0x36, 0x36 },
3428 { 0x00, 0x37, 0x37 },
3429 { 0x00, 0x38, 0x38 },
3430 { 0x00, 0x39, 0x39 },
3431 { 0x00, 0x3a, 0x3a },
3432 { 0x00, 0x3b, 0x3b },
3433 { 0x00, 0x3c, 0x3c },
3434 { 0x00, 0x3d, 0x3d },
3435 { 0x00, 0x3e, 0x3e },
3436 { 0x00, 0x3f, 0x3f },
3437 { 0x00, 0x40, 0x40 },
3438 { 0x01, 0x61, 0x41 },
3439 { 0x01, 0x62, 0x42 },
3440 { 0x01, 0x63, 0x43 },
3441 { 0x01, 0x64, 0x44 },
3442 { 0x01, 0x65, 0x45 },
3443 { 0x01, 0x66, 0x46 },
3444 { 0x01, 0x67, 0x47 },
3445 { 0x01, 0x68, 0x48 },
3446 { 0x01, 0x69, 0x49 },
3447 { 0x01, 0x6a, 0x4a },
3448 { 0x01, 0x6b, 0x4b },
3449 { 0x01, 0x6c, 0x4c },
3450 { 0x01, 0x6d, 0x4d },
3451 { 0x01, 0x6e, 0x4e },
3452 { 0x01, 0x6f, 0x4f },
3453 { 0x01, 0x70, 0x50 },
3454 { 0x01, 0x71, 0x51 },
3455 { 0x01, 0x72, 0x52 },
3456 { 0x01, 0x73, 0x53 },
3457 { 0x01, 0x74, 0x54 },
3458 { 0x01, 0x75, 0x55 },
3459 { 0x01, 0x76, 0x56 },
3460 { 0x01, 0x77, 0x57 },
3461 { 0x01, 0x78, 0x58 },
3462 { 0x01, 0x79, 0x59 },
3463 { 0x01, 0x7a, 0x5a },
3464 { 0x00, 0x5b, 0x5b },
3465 { 0x00, 0x5c, 0x5c },
3466 { 0x00, 0x5d, 0x5d },
3467 { 0x00, 0x5e, 0x5e },
3468 { 0x00, 0x5f, 0x5f },
3469 { 0x00, 0x60, 0x60 },
3470 { 0x00, 0x61, 0x41 },
3471 { 0x00, 0x62, 0x42 },
3472 { 0x00, 0x63, 0x43 },
3473 { 0x00, 0x64, 0x44 },
3474 { 0x00, 0x65, 0x45 },
3475 { 0x00, 0x66, 0x46 },
3476 { 0x00, 0x67, 0x47 },
3477 { 0x00, 0x68, 0x48 },
3478 { 0x00, 0x69, 0x49 },
3479 { 0x00, 0x6a, 0x4a },
3480 { 0x00, 0x6b, 0x4b },
3481 { 0x00, 0x6c, 0x4c },
3482 { 0x00, 0x6d, 0x4d },
3483 { 0x00, 0x6e, 0x4e },
3484 { 0x00, 0x6f, 0x4f },
3485 { 0x00, 0x70, 0x50 },
3486 { 0x00, 0x71, 0x51 },
3487 { 0x00, 0x72, 0x52 },
3488 { 0x00, 0x73, 0x53 },
3489 { 0x00, 0x74, 0x54 },
3490 { 0x00, 0x75, 0x55 },
3491 { 0x00, 0x76, 0x56 },
3492 { 0x00, 0x77, 0x57 },
3493 { 0x00, 0x78, 0x58 },
3494 { 0x00, 0x79, 0x59 },
3495 { 0x00, 0x7a, 0x5a },
3496 { 0x00, 0x7b, 0x7b },
3497 { 0x00, 0x7c, 0x7c },
3498 { 0x00, 0x7d, 0x7d },
3499 { 0x00, 0x7e, 0x7e },
3500 { 0x00, 0x7f, 0x7f },
3501 { 0x00, 0x80, 0x80 },
3502 { 0x00, 0x81, 0x81 },
3503 { 0x00, 0x82, 0x82 },
3504 { 0x00, 0x83, 0x83 },
3505 { 0x00, 0x84, 0x84 },
3506 { 0x00, 0x85, 0x85 },
3507 { 0x00, 0x86, 0x86 },
3508 { 0x00, 0x87, 0x87 },
3509 { 0x00, 0x88, 0x88 },
3510 { 0x00, 0x89, 0x89 },
3511 { 0x00, 0x8a, 0x8a },
3512 { 0x00, 0x8b, 0x8b },
3513 { 0x00, 0x8c, 0x8c },
3514 { 0x00, 0x8d, 0x8d },
3515 { 0x00, 0x8e, 0x8e },
3516 { 0x00, 0x8f, 0x8f },
3517 { 0x00, 0x90, 0x90 },
3518 { 0x00, 0x91, 0x91 },
3519 { 0x00, 0x92, 0x92 },
3520 { 0x00, 0x93, 0x93 },
3521 { 0x00, 0x94, 0x94 },
3522 { 0x00, 0x95, 0x95 },
3523 { 0x00, 0x96, 0x96 },
3524 { 0x00, 0x97, 0x97 },
3525 { 0x00, 0x98, 0x98 },
3526 { 0x00, 0x99, 0x99 },
3527 { 0x00, 0x9a, 0x9a },
3528 { 0x00, 0x9b, 0x9b },
3529 { 0x00, 0x9c, 0x9c },
3530 { 0x00, 0x9d, 0x9d },
3531 { 0x00, 0x9e, 0x9e },
3532 { 0x00, 0x9f, 0x9f },
3533 { 0x00, 0xa0, 0xa0 },
3534 { 0x00, 0xa1, 0xa1 },
3535 { 0x00, 0xa2, 0xa2 },
3536 { 0x00, 0xa3, 0xb3 },
3537 { 0x00, 0xa4, 0xa4 },
3538 { 0x00, 0xa5, 0xa5 },
3539 { 0x00, 0xa6, 0xa6 },
3540 { 0x00, 0xa7, 0xa7 },
3541 { 0x00, 0xa8, 0xa8 },
3542 { 0x00, 0xa9, 0xa9 },
3543 { 0x00, 0xaa, 0xaa },
3544 { 0x00, 0xab, 0xab },
3545 { 0x00, 0xac, 0xac },
3546 { 0x00, 0xad, 0xad },
3547 { 0x00, 0xae, 0xae },
3548 { 0x00, 0xaf, 0xaf },
3549 { 0x00, 0xb0, 0xb0 },
3550 { 0x00, 0xb1, 0xb1 },
3551 { 0x00, 0xb2, 0xb2 },
3552 { 0x01, 0xa3, 0xb3 },
3553 { 0x00, 0xb4, 0xb4 },
3554 { 0x00, 0xb5, 0xb5 },
3555 { 0x00, 0xb6, 0xb6 },
3556 { 0x00, 0xb7, 0xb7 },
3557 { 0x00, 0xb8, 0xb8 },
3558 { 0x00, 0xb9, 0xb9 },
3559 { 0x00, 0xba, 0xba },
3560 { 0x00, 0xbb, 0xbb },
3561 { 0x00, 0xbc, 0xbc },
3562 { 0x00, 0xbd, 0xbd },
3563 { 0x00, 0xbe, 0xbe },
3564 { 0x00, 0xbf, 0xbf },
3565 { 0x00, 0xc0, 0xe0 },
3566 { 0x00, 0xc1, 0xe1 },
3567 { 0x00, 0xc2, 0xe2 },
3568 { 0x00, 0xc3, 0xe3 },
3569 { 0x00, 0xc4, 0xe4 },
3570 { 0x00, 0xc5, 0xe5 },
3571 { 0x00, 0xc6, 0xe6 },
3572 { 0x00, 0xc7, 0xe7 },
3573 { 0x00, 0xc8, 0xe8 },
3574 { 0x00, 0xc9, 0xe9 },
3575 { 0x00, 0xca, 0xea },
3576 { 0x00, 0xcb, 0xeb },
3577 { 0x00, 0xcc, 0xec },
3578 { 0x00, 0xcd, 0xed },
3579 { 0x00, 0xce, 0xee },
3580 { 0x00, 0xcf, 0xef },
3581 { 0x00, 0xd0, 0xf0 },
3582 { 0x00, 0xd1, 0xf1 },
3583 { 0x00, 0xd2, 0xf2 },
3584 { 0x00, 0xd3, 0xf3 },
3585 { 0x00, 0xd4, 0xf4 },
3586 { 0x00, 0xd5, 0xf5 },
3587 { 0x00, 0xd6, 0xf6 },
3588 { 0x00, 0xd7, 0xf7 },
3589 { 0x00, 0xd8, 0xf8 },
3590 { 0x00, 0xd9, 0xf9 },
3591 { 0x00, 0xda, 0xfa },
3592 { 0x00, 0xdb, 0xfb },
3593 { 0x00, 0xdc, 0xfc },
3594 { 0x00, 0xdd, 0xfd },
3595 { 0x00, 0xde, 0xfe },
3596 { 0x00, 0xdf, 0xff },
3597 { 0x01, 0xc0, 0xe0 },
3598 { 0x01, 0xc1, 0xe1 },
3599 { 0x01, 0xc2, 0xe2 },
3600 { 0x01, 0xc3, 0xe3 },
3601 { 0x01, 0xc4, 0xe4 },
3602 { 0x01, 0xc5, 0xe5 },
3603 { 0x01, 0xc6, 0xe6 },
3604 { 0x01, 0xc7, 0xe7 },
3605 { 0x01, 0xc8, 0xe8 },
3606 { 0x01, 0xc9, 0xe9 },
3607 { 0x01, 0xca, 0xea },
3608 { 0x01, 0xcb, 0xeb },
3609 { 0x01, 0xcc, 0xec },
3610 { 0x01, 0xcd, 0xed },
3611 { 0x01, 0xce, 0xee },
3612 { 0x01, 0xcf, 0xef },
3613 { 0x01, 0xd0, 0xf0 },
3614 { 0x01, 0xd1, 0xf1 },
3615 { 0x01, 0xd2, 0xf2 },
3616 { 0x01, 0xd3, 0xf3 },
3617 { 0x01, 0xd4, 0xf4 },
3618 { 0x01, 0xd5, 0xf5 },
3619 { 0x01, 0xd6, 0xf6 },
3620 { 0x01, 0xd7, 0xf7 },
3621 { 0x01, 0xd8, 0xf8 },
3622 { 0x01, 0xd9, 0xf9 },
3623 { 0x01, 0xda, 0xfa },
3624 { 0x01, 0xdb, 0xfb },
3625 { 0x01, 0xdc, 0xfc },
3626 { 0x01, 0xdd, 0xfd },
3627 { 0x01, 0xde, 0xfe },
3628 { 0x01, 0xdf, 0xff }
3631 struct cs_info koi8u_tbl[] = {
3632 { 0x00, 0x00, 0x00 },
3633 { 0x00, 0x01, 0x01 },
3634 { 0x00, 0x02, 0x02 },
3635 { 0x00, 0x03, 0x03 },
3636 { 0x00, 0x04, 0x04 },
3637 { 0x00, 0x05, 0x05 },
3638 { 0x00, 0x06, 0x06 },
3639 { 0x00, 0x07, 0x07 },
3640 { 0x00, 0x08, 0x08 },
3641 { 0x00, 0x09, 0x09 },
3642 { 0x00, 0x0a, 0x0a },
3643 { 0x00, 0x0b, 0x0b },
3644 { 0x00, 0x0c, 0x0c },
3645 { 0x00, 0x0d, 0x0d },
3646 { 0x00, 0x0e, 0x0e },
3647 { 0x00, 0x0f, 0x0f },
3648 { 0x00, 0x10, 0x10 },
3649 { 0x00, 0x11, 0x11 },
3650 { 0x00, 0x12, 0x12 },
3651 { 0x00, 0x13, 0x13 },
3652 { 0x00, 0x14, 0x14 },
3653 { 0x00, 0x15, 0x15 },
3654 { 0x00, 0x16, 0x16 },
3655 { 0x00, 0x17, 0x17 },
3656 { 0x00, 0x18, 0x18 },
3657 { 0x00, 0x19, 0x19 },
3658 { 0x00, 0x1a, 0x1a },
3659 { 0x00, 0x1b, 0x1b },
3660 { 0x00, 0x1c, 0x1c },
3661 { 0x00, 0x1d, 0x1d },
3662 { 0x00, 0x1e, 0x1e },
3663 { 0x00, 0x1f, 0x1f },
3664 { 0x00, 0x20, 0x20 },
3665 { 0x00, 0x21, 0x21 },
3666 { 0x00, 0x22, 0x22 },
3667 { 0x00, 0x23, 0x23 },
3668 { 0x00, 0x24, 0x24 },
3669 { 0x00, 0x25, 0x25 },
3670 { 0x00, 0x26, 0x26 },
3671 { 0x00, 0x27, 0x27 },
3672 { 0x00, 0x28, 0x28 },
3673 { 0x00, 0x29, 0x29 },
3674 { 0x00, 0x2a, 0x2a },
3675 { 0x00, 0x2b, 0x2b },
3676 { 0x00, 0x2c, 0x2c },
3677 { 0x00, 0x2d, 0x2d },
3678 { 0x00, 0x2e, 0x2e },
3679 { 0x00, 0x2f, 0x2f },
3680 { 0x00, 0x30, 0x30 },
3681 { 0x00, 0x31, 0x31 },
3682 { 0x00, 0x32, 0x32 },
3683 { 0x00, 0x33, 0x33 },
3684 { 0x00, 0x34, 0x34 },
3685 { 0x00, 0x35, 0x35 },
3686 { 0x00, 0x36, 0x36 },
3687 { 0x00, 0x37, 0x37 },
3688 { 0x00, 0x38, 0x38 },
3689 { 0x00, 0x39, 0x39 },
3690 { 0x00, 0x3a, 0x3a },
3691 { 0x00, 0x3b, 0x3b },
3692 { 0x00, 0x3c, 0x3c },
3693 { 0x00, 0x3d, 0x3d },
3694 { 0x00, 0x3e, 0x3e },
3695 { 0x00, 0x3f, 0x3f },
3696 { 0x00, 0x40, 0x40 },
3697 { 0x01, 0x61, 0x41 },
3698 { 0x01, 0x62, 0x42 },
3699 { 0x01, 0x63, 0x43 },
3700 { 0x01, 0x64, 0x44 },
3701 { 0x01, 0x65, 0x45 },
3702 { 0x01, 0x66, 0x46 },
3703 { 0x01, 0x67, 0x47 },
3704 { 0x01, 0x68, 0x48 },
3705 { 0x01, 0x69, 0x49 },
3706 { 0x01, 0x6a, 0x4a },
3707 { 0x01, 0x6b, 0x4b },
3708 { 0x01, 0x6c, 0x4c },
3709 { 0x01, 0x6d, 0x4d },
3710 { 0x01, 0x6e, 0x4e },
3711 { 0x01, 0x6f, 0x4f },
3712 { 0x01, 0x70, 0x50 },
3713 { 0x01, 0x71, 0x51 },
3714 { 0x01, 0x72, 0x52 },
3715 { 0x01, 0x73, 0x53 },
3716 { 0x01, 0x74, 0x54 },
3717 { 0x01, 0x75, 0x55 },
3718 { 0x01, 0x76, 0x56 },
3719 { 0x01, 0x77, 0x57 },
3720 { 0x01, 0x78, 0x58 },
3721 { 0x01, 0x79, 0x59 },
3722 { 0x01, 0x7a, 0x5a },
3723 { 0x00, 0x5b, 0x5b },
3724 { 0x00, 0x5c, 0x5c },
3725 { 0x00, 0x5d, 0x5d },
3726 { 0x00, 0x5e, 0x5e },
3727 { 0x00, 0x5f, 0x5f },
3728 { 0x00, 0x60, 0x60 },
3729 { 0x00, 0x61, 0x41 },
3730 { 0x00, 0x62, 0x42 },
3731 { 0x00, 0x63, 0x43 },
3732 { 0x00, 0x64, 0x44 },
3733 { 0x00, 0x65, 0x45 },
3734 { 0x00, 0x66, 0x46 },
3735 { 0x00, 0x67, 0x47 },
3736 { 0x00, 0x68, 0x48 },
3737 { 0x00, 0x69, 0x49 },
3738 { 0x00, 0x6a, 0x4a },
3739 { 0x00, 0x6b, 0x4b },
3740 { 0x00, 0x6c, 0x4c },
3741 { 0x00, 0x6d, 0x4d },
3742 { 0x00, 0x6e, 0x4e },
3743 { 0x00, 0x6f, 0x4f },
3744 { 0x00, 0x70, 0x50 },
3745 { 0x00, 0x71, 0x51 },
3746 { 0x00, 0x72, 0x52 },
3747 { 0x00, 0x73, 0x53 },
3748 { 0x00, 0x74, 0x54 },
3749 { 0x00, 0x75, 0x55 },
3750 { 0x00, 0x76, 0x56 },
3751 { 0x00, 0x77, 0x57 },
3752 { 0x00, 0x78, 0x58 },
3753 { 0x00, 0x79, 0x59 },
3754 { 0x00, 0x7a, 0x5a },
3755 { 0x00, 0x7b, 0x7b },
3756 { 0x00, 0x7c, 0x7c },
3757 { 0x00, 0x7d, 0x7d },
3758 { 0x00, 0x7e, 0x7e },
3759 { 0x00, 0x7f, 0x7f },
3760 { 0x00, 0x80, 0x80 },
3761 { 0x00, 0x81, 0x81 },
3762 { 0x00, 0x82, 0x82 },
3763 { 0x00, 0x83, 0x83 },
3764 { 0x00, 0x84, 0x84 },
3765 { 0x00, 0x85, 0x85 },
3766 { 0x00, 0x86, 0x86 },
3767 { 0x00, 0x87, 0x87 },
3768 { 0x00, 0x88, 0x88 },
3769 { 0x00, 0x89, 0x89 },
3770 { 0x00, 0x8a, 0x8a },
3771 { 0x00, 0x8b, 0x8b },
3772 { 0x00, 0x8c, 0x8c },
3773 { 0x00, 0x8d, 0x8d },
3774 { 0x00, 0x8e, 0x8e },
3775 { 0x00, 0x8f, 0x8f },
3776 { 0x00, 0x90, 0x90 },
3777 { 0x00, 0x91, 0x91 },
3778 { 0x00, 0x92, 0x92 },
3779 { 0x00, 0x93, 0x93 },
3780 { 0x00, 0x94, 0x94 },
3781 { 0x00, 0x95, 0x95 },
3782 { 0x00, 0x96, 0x96 },
3783 { 0x00, 0x97, 0x97 },
3784 { 0x00, 0x98, 0x98 },
3785 { 0x00, 0x99, 0x99 },
3786 { 0x00, 0x9a, 0x9a },
3787 { 0x00, 0x9b, 0x9b },
3788 { 0x00, 0x9c, 0x9c },
3789 { 0x00, 0x9d, 0x9d },
3790 { 0x00, 0x9e, 0x9e },
3791 { 0x00, 0x9f, 0x9f },
3792 { 0x00, 0xa0, 0xa0 },
3793 { 0x00, 0xa1, 0xa1 },
3794 { 0x00, 0xa2, 0xa2 },
3795 { 0x00, 0xa3, 0xb3 },
3796 { 0x00, 0xa4, 0xb4 }, /* ie */
3797 { 0x00, 0xa5, 0xa5 },
3798 { 0x00, 0xa6, 0xb6 }, /* i */
3799 { 0x00, 0xa7, 0xb7 }, /* ii */
3800 { 0x00, 0xa8, 0xa8 },
3801 { 0x00, 0xa9, 0xa9 },
3802 { 0x00, 0xaa, 0xaa },
3803 { 0x00, 0xab, 0xab },
3804 { 0x00, 0xac, 0xac },
3805 { 0x00, 0xad, 0xbd }, /* g'' */
3806 { 0x00, 0xae, 0xae },
3807 { 0x00, 0xaf, 0xaf },
3808 { 0x00, 0xb0, 0xb0 },
3809 { 0x00, 0xb1, 0xb1 },
3810 { 0x00, 0xb2, 0xb2 },
3811 { 0x01, 0xa3, 0xb3 },
3812 { 0x00, 0xb4, 0xb4 }, /* IE */
3813 { 0x00, 0xb5, 0xb5 },
3814 { 0x00, 0xb6, 0xb6 }, /* I */
3815 { 0x00, 0xb7, 0xb7 }, /* II */
3816 { 0x00, 0xb8, 0xb8 },
3817 { 0x00, 0xb9, 0xb9 },
3818 { 0x00, 0xba, 0xba },
3819 { 0x00, 0xbb, 0xbb },
3820 { 0x00, 0xbc, 0xbc },
3821 { 0x00, 0xbd, 0xbd },
3822 { 0x00, 0xbe, 0xbe },
3823 { 0x00, 0xbf, 0xbf },
3824 { 0x00, 0xc0, 0xe0 },
3825 { 0x00, 0xc1, 0xe1 },
3826 { 0x00, 0xc2, 0xe2 },
3827 { 0x00, 0xc3, 0xe3 },
3828 { 0x00, 0xc4, 0xe4 },
3829 { 0x00, 0xc5, 0xe5 },
3830 { 0x00, 0xc6, 0xe6 },
3831 { 0x00, 0xc7, 0xe7 },
3832 { 0x00, 0xc8, 0xe8 },
3833 { 0x00, 0xc9, 0xe9 },
3834 { 0x00, 0xca, 0xea },
3835 { 0x00, 0xcb, 0xeb },
3836 { 0x00, 0xcc, 0xec },
3837 { 0x00, 0xcd, 0xed },
3838 { 0x00, 0xce, 0xee },
3839 { 0x00, 0xcf, 0xef },
3840 { 0x00, 0xd0, 0xf0 },
3841 { 0x00, 0xd1, 0xf1 },
3842 { 0x00, 0xd2, 0xf2 },
3843 { 0x00, 0xd3, 0xf3 },
3844 { 0x00, 0xd4, 0xf4 },
3845 { 0x00, 0xd5, 0xf5 },
3846 { 0x00, 0xd6, 0xf6 },
3847 { 0x00, 0xd7, 0xf7 },
3848 { 0x00, 0xd8, 0xf8 },
3849 { 0x00, 0xd9, 0xf9 },
3850 { 0x00, 0xda, 0xfa },
3851 { 0x00, 0xdb, 0xfb },
3852 { 0x00, 0xdc, 0xfc },
3853 { 0x00, 0xdd, 0xfd },
3854 { 0x00, 0xde, 0xfe },
3855 { 0x00, 0xdf, 0xff },
3856 { 0x01, 0xc0, 0xe0 },
3857 { 0x01, 0xc1, 0xe1 },
3858 { 0x01, 0xc2, 0xe2 },
3859 { 0x01, 0xc3, 0xe3 },
3860 { 0x01, 0xc4, 0xe4 },
3861 { 0x01, 0xc5, 0xe5 },
3862 { 0x01, 0xc6, 0xe6 },
3863 { 0x01, 0xc7, 0xe7 },
3864 { 0x01, 0xc8, 0xe8 },
3865 { 0x01, 0xc9, 0xe9 },
3866 { 0x01, 0xca, 0xea },
3867 { 0x01, 0xcb, 0xeb },
3868 { 0x01, 0xcc, 0xec },
3869 { 0x01, 0xcd, 0xed },
3870 { 0x01, 0xce, 0xee },
3871 { 0x01, 0xcf, 0xef },
3872 { 0x01, 0xd0, 0xf0 },
3873 { 0x01, 0xd1, 0xf1 },
3874 { 0x01, 0xd2, 0xf2 },
3875 { 0x01, 0xd3, 0xf3 },
3876 { 0x01, 0xd4, 0xf4 },
3877 { 0x01, 0xd5, 0xf5 },
3878 { 0x01, 0xd6, 0xf6 },
3879 { 0x01, 0xd7, 0xf7 },
3880 { 0x01, 0xd8, 0xf8 },
3881 { 0x01, 0xd9, 0xf9 },
3882 { 0x01, 0xda, 0xfa },
3883 { 0x01, 0xdb, 0xfb },
3884 { 0x01, 0xdc, 0xfc },
3885 { 0x01, 0xdd, 0xfd },
3886 { 0x01, 0xde, 0xfe },
3887 { 0x01, 0xdf, 0xff }
3890 struct cs_info cp1251_tbl[] = {
3891 { 0x00, 0x00, 0x00 },
3892 { 0x00, 0x01, 0x01 },
3893 { 0x00, 0x02, 0x02 },
3894 { 0x00, 0x03, 0x03 },
3895 { 0x00, 0x04, 0x04 },
3896 { 0x00, 0x05, 0x05 },
3897 { 0x00, 0x06, 0x06 },
3898 { 0x00, 0x07, 0x07 },
3899 { 0x00, 0x08, 0x08 },
3900 { 0x00, 0x09, 0x09 },
3901 { 0x00, 0x0a, 0x0a },
3902 { 0x00, 0x0b, 0x0b },
3903 { 0x00, 0x0c, 0x0c },
3904 { 0x00, 0x0d, 0x0d },
3905 { 0x00, 0x0e, 0x0e },
3906 { 0x00, 0x0f, 0x0f },
3907 { 0x00, 0x10, 0x10 },
3908 { 0x00, 0x11, 0x11 },
3909 { 0x00, 0x12, 0x12 },
3910 { 0x00, 0x13, 0x13 },
3911 { 0x00, 0x14, 0x14 },
3912 { 0x00, 0x15, 0x15 },
3913 { 0x00, 0x16, 0x16 },
3914 { 0x00, 0x17, 0x17 },
3915 { 0x00, 0x18, 0x18 },
3916 { 0x00, 0x19, 0x19 },
3917 { 0x00, 0x1a, 0x1a },
3918 { 0x00, 0x1b, 0x1b },
3919 { 0x00, 0x1c, 0x1c },
3920 { 0x00, 0x1d, 0x1d },
3921 { 0x00, 0x1e, 0x1e },
3922 { 0x00, 0x1f, 0x1f },
3923 { 0x00, 0x20, 0x20 },
3924 { 0x00, 0x21, 0x21 },
3925 { 0x00, 0x22, 0x22 },
3926 { 0x00, 0x23, 0x23 },
3927 { 0x00, 0x24, 0x24 },
3928 { 0x00, 0x25, 0x25 },
3929 { 0x00, 0x26, 0x26 },
3930 { 0x00, 0x27, 0x27 },
3931 { 0x00, 0x28, 0x28 },
3932 { 0x00, 0x29, 0x29 },
3933 { 0x00, 0x2a, 0x2a },
3934 { 0x00, 0x2b, 0x2b },
3935 { 0x00, 0x2c, 0x2c },
3936 { 0x00, 0x2d, 0x2d },
3937 { 0x00, 0x2e, 0x2e },
3938 { 0x00, 0x2f, 0x2f },
3939 { 0x00, 0x30, 0x30 },
3940 { 0x00, 0x31, 0x31 },
3941 { 0x00, 0x32, 0x32 },
3942 { 0x00, 0x33, 0x33 },
3943 { 0x00, 0x34, 0x34 },
3944 { 0x00, 0x35, 0x35 },
3945 { 0x00, 0x36, 0x36 },
3946 { 0x00, 0x37, 0x37 },
3947 { 0x00, 0x38, 0x38 },
3948 { 0x00, 0x39, 0x39 },
3949 { 0x00, 0x3a, 0x3a },
3950 { 0x00, 0x3b, 0x3b },
3951 { 0x00, 0x3c, 0x3c },
3952 { 0x00, 0x3d, 0x3d },
3953 { 0x00, 0x3e, 0x3e },
3954 { 0x00, 0x3f, 0x3f },
3955 { 0x00, 0x40, 0x40 },
3956 { 0x01, 0x61, 0x41 },
3957 { 0x01, 0x62, 0x42 },
3958 { 0x01, 0x63, 0x43 },
3959 { 0x01, 0x64, 0x44 },
3960 { 0x01, 0x65, 0x45 },
3961 { 0x01, 0x66, 0x46 },
3962 { 0x01, 0x67, 0x47 },
3963 { 0x01, 0x68, 0x48 },
3964 { 0x01, 0x69, 0x49 },
3965 { 0x01, 0x6a, 0x4a },
3966 { 0x01, 0x6b, 0x4b },
3967 { 0x01, 0x6c, 0x4c },
3968 { 0x01, 0x6d, 0x4d },
3969 { 0x01, 0x6e, 0x4e },
3970 { 0x01, 0x6f, 0x4f },
3971 { 0x01, 0x70, 0x50 },
3972 { 0x01, 0x71, 0x51 },
3973 { 0x01, 0x72, 0x52 },
3974 { 0x01, 0x73, 0x53 },
3975 { 0x01, 0x74, 0x54 },
3976 { 0x01, 0x75, 0x55 },
3977 { 0x01, 0x76, 0x56 },
3978 { 0x01, 0x77, 0x57 },
3979 { 0x01, 0x78, 0x58 },
3980 { 0x01, 0x79, 0x59 },
3981 { 0x01, 0x7a, 0x5a },
3982 { 0x00, 0x5b, 0x5b },
3983 { 0x00, 0x5c, 0x5c },
3984 { 0x00, 0x5d, 0x5d },
3985 { 0x00, 0x5e, 0x5e },
3986 { 0x00, 0x5f, 0x5f },
3987 { 0x00, 0x60, 0x60 },
3988 { 0x00, 0x61, 0x41 },
3989 { 0x00, 0x62, 0x42 },
3990 { 0x00, 0x63, 0x43 },
3991 { 0x00, 0x64, 0x44 },
3992 { 0x00, 0x65, 0x45 },
3993 { 0x00, 0x66, 0x46 },
3994 { 0x00, 0x67, 0x47 },
3995 { 0x00, 0x68, 0x48 },
3996 { 0x00, 0x69, 0x49 },
3997 { 0x00, 0x6a, 0x4a },
3998 { 0x00, 0x6b, 0x4b },
3999 { 0x00, 0x6c, 0x4c },
4000 { 0x00, 0x6d, 0x4d },
4001 { 0x00, 0x6e, 0x4e },
4002 { 0x00, 0x6f, 0x4f },
4003 { 0x00, 0x70, 0x50 },
4004 { 0x00, 0x71, 0x51 },
4005 { 0x00, 0x72, 0x52 },
4006 { 0x00, 0x73, 0x53 },
4007 { 0x00, 0x74, 0x54 },
4008 { 0x00, 0x75, 0x55 },
4009 { 0x00, 0x76, 0x56 },
4010 { 0x00, 0x77, 0x57 },
4011 { 0x00, 0x78, 0x58 },
4012 { 0x00, 0x79, 0x59 },
4013 { 0x00, 0x7a, 0x5a },
4014 { 0x00, 0x7b, 0x7b },
4015 { 0x00, 0x7c, 0x7c },
4016 { 0x00, 0x7d, 0x7d },
4017 { 0x00, 0x7e, 0x7e },
4018 { 0x00, 0x7f, 0x7f },
4019 { 0x01, 0x90, 0x80 },
4020 { 0x01, 0x83, 0x81 },
4021 { 0x00, 0x82, 0x82 },
4022 { 0x00, 0x83, 0x81 },
4023 { 0x00, 0x84, 0x84 },
4024 { 0x00, 0x85, 0x85 },
4025 { 0x00, 0x86, 0x86 },
4026 { 0x00, 0x87, 0x87 },
4027 { 0x00, 0x88, 0x88 },
4028 { 0x00, 0x89, 0x89 },
4029 { 0x01, 0x9a, 0x8a },
4030 { 0x00, 0x8b, 0x8b },
4031 { 0x01, 0x9c, 0x8c },
4032 { 0x01, 0x9d, 0x8d },
4033 { 0x01, 0x9e, 0x8e },
4034 { 0x01, 0x9f, 0x8f },
4035 { 0x00, 0x90, 0x80 },
4036 { 0x00, 0x91, 0x91 },
4037 { 0x00, 0x92, 0x92 },
4038 { 0x00, 0x93, 0x93 },
4039 { 0x00, 0x94, 0x94 },
4040 { 0x00, 0x95, 0x95 },
4041 { 0x00, 0x96, 0x96 },
4042 { 0x00, 0x97, 0x97 },
4043 { 0x00, 0x98, 0x98 },
4044 { 0x00, 0x99, 0x99 },
4045 { 0x00, 0x9a, 0x8a },
4046 { 0x00, 0x9b, 0x9b },
4047 { 0x00, 0x9c, 0x8c },
4048 { 0x00, 0x9d, 0x8d },
4049 { 0x00, 0x9e, 0x8e },
4050 { 0x00, 0x9f, 0x8f },
4051 { 0x00, 0xa0, 0xa0 },
4052 { 0x01, 0xa2, 0xa1 },
4053 { 0x00, 0xa2, 0xa1 },
4054 { 0x01, 0xbc, 0xa3 },
4055 { 0x00, 0xa4, 0xa4 },
4056 { 0x01, 0xb4, 0xa5 },
4057 { 0x00, 0xa6, 0xa6 },
4058 { 0x00, 0xa7, 0xa7 },
4059 { 0x01, 0xb8, 0xa8 },
4060 { 0x00, 0xa9, 0xa9 },
4061 { 0x01, 0xba, 0xaa },
4062 { 0x00, 0xab, 0xab },
4063 { 0x00, 0xac, 0xac },
4064 { 0x00, 0xad, 0xad },
4065 { 0x00, 0xae, 0xae },
4066 { 0x01, 0xbf, 0xaf },
4067 { 0x00, 0xb0, 0xb0 },
4068 { 0x00, 0xb1, 0xb1 },
4069 { 0x01, 0xb3, 0xb2 },
4070 { 0x00, 0xb3, 0xb2 },
4071 { 0x00, 0xb4, 0xa5 },
4072 { 0x00, 0xb5, 0xb5 },
4073 { 0x00, 0xb6, 0xb6 },
4074 { 0x00, 0xb7, 0xb7 },
4075 { 0x00, 0xb8, 0xa8 },
4076 { 0x00, 0xb9, 0xb9 },
4077 { 0x00, 0xba, 0xaa },
4078 { 0x00, 0xbb, 0xbb },
4079 { 0x00, 0xbc, 0xa3 },
4080 { 0x01, 0xbe, 0xbd },
4081 { 0x00, 0xbe, 0xbd },
4082 { 0x00, 0xbf, 0xaf },
4083 { 0x01, 0xe0, 0xc0 },
4084 { 0x01, 0xe1, 0xc1 },
4085 { 0x01, 0xe2, 0xc2 },
4086 { 0x01, 0xe3, 0xc3 },
4087 { 0x01, 0xe4, 0xc4 },
4088 { 0x01, 0xe5, 0xc5 },
4089 { 0x01, 0xe6, 0xc6 },
4090 { 0x01, 0xe7, 0xc7 },
4091 { 0x01, 0xe8, 0xc8 },
4092 { 0x01, 0xe9, 0xc9 },
4093 { 0x01, 0xea, 0xca },
4094 { 0x01, 0xeb, 0xcb },
4095 { 0x01, 0xec, 0xcc },
4096 { 0x01, 0xed, 0xcd },
4097 { 0x01, 0xee, 0xce },
4098 { 0x01, 0xef, 0xcf },
4099 { 0x01, 0xf0, 0xd0 },
4100 { 0x01, 0xf1, 0xd1 },
4101 { 0x01, 0xf2, 0xd2 },
4102 { 0x01, 0xf3, 0xd3 },
4103 { 0x01, 0xf4, 0xd4 },
4104 { 0x01, 0xf5, 0xd5 },
4105 { 0x01, 0xf6, 0xd6 },
4106 { 0x01, 0xf7, 0xd7 },
4107 { 0x01, 0xf8, 0xd8 },
4108 { 0x01, 0xf9, 0xd9 },
4109 { 0x01, 0xfa, 0xda },
4110 { 0x01, 0xfb, 0xdb },
4111 { 0x01, 0xfc, 0xdc },
4112 { 0x01, 0xfd, 0xdd },
4113 { 0x01, 0xfe, 0xde },
4114 { 0x01, 0xff, 0xdf },
4115 { 0x00, 0xe0, 0xc0 },
4116 { 0x00, 0xe1, 0xc1 },
4117 { 0x00, 0xe2, 0xc2 },
4118 { 0x00, 0xe3, 0xc3 },
4119 { 0x00, 0xe4, 0xc4 },
4120 { 0x00, 0xe5, 0xc5 },
4121 { 0x00, 0xe6, 0xc6 },
4122 { 0x00, 0xe7, 0xc7 },
4123 { 0x00, 0xe8, 0xc8 },
4124 { 0x00, 0xe9, 0xc9 },
4125 { 0x00, 0xea, 0xca },
4126 { 0x00, 0xeb, 0xcb },
4127 { 0x00, 0xec, 0xcc },
4128 { 0x00, 0xed, 0xcd },
4129 { 0x00, 0xee, 0xce },
4130 { 0x00, 0xef, 0xcf },
4131 { 0x00, 0xf0, 0xd0 },
4132 { 0x00, 0xf1, 0xd1 },
4133 { 0x00, 0xf2, 0xd2 },
4134 { 0x00, 0xf3, 0xd3 },
4135 { 0x00, 0xf4, 0xd4 },
4136 { 0x00, 0xf5, 0xd5 },
4137 { 0x00, 0xf6, 0xd6 },
4138 { 0x00, 0xf7, 0xd7 },
4139 { 0x00, 0xf8, 0xd8 },
4140 { 0x00, 0xf9, 0xd9 },
4141 { 0x00, 0xfa, 0xda },
4142 { 0x00, 0xfb, 0xdb },
4143 { 0x00, 0xfc, 0xdc },
4144 { 0x00, 0xfd, 0xdd },
4145 { 0x00, 0xfe, 0xde },
4146 { 0x00, 0xff, 0xdf }
4149 struct cs_info iso13_tbl[] = {
4150 { 0x00, 0x00, 0x00 },
4151 { 0x00, 0x01, 0x01 },
4152 { 0x00, 0x02, 0x02 },
4153 { 0x00, 0x03, 0x03 },
4154 { 0x00, 0x04, 0x04 },
4155 { 0x00, 0x05, 0x05 },
4156 { 0x00, 0x06, 0x06 },
4157 { 0x00, 0x07, 0x07 },
4158 { 0x00, 0x08, 0x08 },
4159 { 0x00, 0x09, 0x09 },
4160 { 0x00, 0x0A, 0x0A },
4161 { 0x00, 0x0B, 0x0B },
4162 { 0x00, 0x0C, 0x0C },
4163 { 0x00, 0x0D, 0x0D },
4164 { 0x00, 0x0E, 0x0E },
4165 { 0x00, 0x0F, 0x0F },
4166 { 0x00, 0x10, 0x10 },
4167 { 0x00, 0x11, 0x11 },
4168 { 0x00, 0x12, 0x12 },
4169 { 0x00, 0x13, 0x13 },
4170 { 0x00, 0x14, 0x14 },
4171 { 0x00, 0x15, 0x15 },
4172 { 0x00, 0x16, 0x16 },
4173 { 0x00, 0x17, 0x17 },
4174 { 0x00, 0x18, 0x18 },
4175 { 0x00, 0x19, 0x19 },
4176 { 0x00, 0x1A, 0x1A },
4177 { 0x00, 0x1B, 0x1B },
4178 { 0x00, 0x1C, 0x1C },
4179 { 0x00, 0x1D, 0x1D },
4180 { 0x00, 0x1E, 0x1E },
4181 { 0x00, 0x1F, 0x1F },
4182 { 0x00, 0x20, 0x20 },
4183 { 0x00, 0x21, 0x21 },
4184 { 0x00, 0x22, 0x22 },
4185 { 0x00, 0x23, 0x23 },
4186 { 0x00, 0x24, 0x24 },
4187 { 0x00, 0x25, 0x25 },
4188 { 0x00, 0x26, 0x26 },
4189 { 0x00, 0x27, 0x27 },
4190 { 0x00, 0x28, 0x28 },
4191 { 0x00, 0x29, 0x29 },
4192 { 0x00, 0x2A, 0x2A },
4193 { 0x00, 0x2B, 0x2B },
4194 { 0x00, 0x2C, 0x2C },
4195 { 0x00, 0x2D, 0x2D },
4196 { 0x00, 0x2E, 0x2E },
4197 { 0x00, 0x2F, 0x2F },
4198 { 0x00, 0x30, 0x30 },
4199 { 0x00, 0x31, 0x31 },
4200 { 0x00, 0x32, 0x32 },
4201 { 0x00, 0x33, 0x33 },
4202 { 0x00, 0x34, 0x34 },
4203 { 0x00, 0x35, 0x35 },
4204 { 0x00, 0x36, 0x36 },
4205 { 0x00, 0x37, 0x37 },
4206 { 0x00, 0x38, 0x38 },
4207 { 0x00, 0x39, 0x39 },
4208 { 0x00, 0x3A, 0x3A },
4209 { 0x00, 0x3B, 0x3B },
4210 { 0x00, 0x3C, 0x3C },
4211 { 0x00, 0x3D, 0x3D },
4212 { 0x00, 0x3E, 0x3E },
4213 { 0x00, 0x3F, 0x3F },
4214 { 0x00, 0x40, 0x40 },
4215 { 0x01, 0x61, 0x41 },
4216 { 0x01, 0x62, 0x42 },
4217 { 0x01, 0x63, 0x43 },
4218 { 0x01, 0x64, 0x44 },
4219 { 0x01, 0x65, 0x45 },
4220 { 0x01, 0x66, 0x46 },
4221 { 0x01, 0x67, 0x47 },
4222 { 0x01, 0x68, 0x48 },
4223 { 0x01, 0x69, 0x49 },
4224 { 0x01, 0x6A, 0x4A },
4225 { 0x01, 0x6B, 0x4B },
4226 { 0x01, 0x6C, 0x4C },
4227 { 0x01, 0x6D, 0x4D },
4228 { 0x01, 0x6E, 0x4E },
4229 { 0x01, 0x6F, 0x4F },
4230 { 0x01, 0x70, 0x50 },
4231 { 0x01, 0x71, 0x51 },
4232 { 0x01, 0x72, 0x52 },
4233 { 0x01, 0x73, 0x53 },
4234 { 0x01, 0x74, 0x54 },
4235 { 0x01, 0x75, 0x55 },
4236 { 0x01, 0x76, 0x56 },
4237 { 0x01, 0x77, 0x57 },
4238 { 0x01, 0x78, 0x58 },
4239 { 0x01, 0x79, 0x59 },
4240 { 0x01, 0x7A, 0x5A },
4241 { 0x00, 0x5B, 0x5B },
4242 { 0x00, 0x5C, 0x5C },
4243 { 0x00, 0x5D, 0x5D },
4244 { 0x00, 0x5E, 0x5E },
4245 { 0x00, 0x5F, 0x5F },
4246 { 0x00, 0x60, 0x60 },
4247 { 0x00, 0x61, 0x41 },
4248 { 0x00, 0x62, 0x42 },
4249 { 0x00, 0x63, 0x43 },
4250 { 0x00, 0x64, 0x44 },
4251 { 0x00, 0x65, 0x45 },
4252 { 0x00, 0x66, 0x46 },
4253 { 0x00, 0x67, 0x47 },
4254 { 0x00, 0x68, 0x48 },
4255 { 0x00, 0x69, 0x49 },
4256 { 0x00, 0x6A, 0x4A },
4257 { 0x00, 0x6B, 0x4B },
4258 { 0x00, 0x6C, 0x4C },
4259 { 0x00, 0x6D, 0x4D },
4260 { 0x00, 0x6E, 0x4E },
4261 { 0x00, 0x6F, 0x4F },
4262 { 0x00, 0x70, 0x50 },
4263 { 0x00, 0x71, 0x51 },
4264 { 0x00, 0x72, 0x52 },
4265 { 0x00, 0x73, 0x53 },
4266 { 0x00, 0x74, 0x54 },
4267 { 0x00, 0x75, 0x55 },
4268 { 0x00, 0x76, 0x56 },
4269 { 0x00, 0x77, 0x57 },
4270 { 0x00, 0x78, 0x58 },
4271 { 0x00, 0x79, 0x59 },
4272 { 0x00, 0x7A, 0x5A },
4273 { 0x00, 0x7B, 0x7B },
4274 { 0x00, 0x7C, 0x7C },
4275 { 0x00, 0x7D, 0x7D },
4276 { 0x00, 0x7E, 0x7E },
4277 { 0x00, 0x7F, 0x7F },
4278 { 0x00, 0x80, 0x80 },
4279 { 0x00, 0x81, 0x81 },
4280 { 0x00, 0x82, 0x82 },
4281 { 0x00, 0x83, 0x83 },
4282 { 0x00, 0x84, 0x84 },
4283 { 0x00, 0x85, 0x85 },
4284 { 0x00, 0x86, 0x86 },
4285 { 0x00, 0x87, 0x87 },
4286 { 0x00, 0x88, 0x88 },
4287 { 0x00, 0x89, 0x89 },
4288 { 0x00, 0x8A, 0x8A },
4289 { 0x00, 0x8B, 0x8B },
4290 { 0x00, 0x8C, 0x8C },
4291 { 0x00, 0x8D, 0x8D },
4292 { 0x00, 0x8E, 0x8E },
4293 { 0x00, 0x8F, 0x8F },
4294 { 0x00, 0x90, 0x90 },
4295 { 0x00, 0x91, 0x91 },
4296 { 0x00, 0x92, 0x92 },
4297 { 0x00, 0x93, 0x93 },
4298 { 0x00, 0x94, 0x94 },
4299 { 0x00, 0x95, 0x95 },
4300 { 0x00, 0x96, 0x96 },
4301 { 0x00, 0x97, 0x97 },
4302 { 0x00, 0x98, 0x98 },
4303 { 0x00, 0x99, 0x99 },
4304 { 0x00, 0x9A, 0x9A },
4305 { 0x00, 0x9B, 0x9B },
4306 { 0x00, 0x9C, 0x9C },
4307 { 0x00, 0x9D, 0x9D },
4308 { 0x00, 0x9E, 0x9E },
4309 { 0x00, 0x9F, 0x9F },
4310 { 0x00, 0xA0, 0xA0 },
4311 { 0x00, 0xA1, 0xA1 },
4312 { 0x00, 0xA2, 0xA2 },
4313 { 0x00, 0xA3, 0xA3 },
4314 { 0x00, 0xA4, 0xA4 },
4315 { 0x00, 0xA5, 0xA5 },
4316 { 0x00, 0xA6, 0xA6 },
4317 { 0x00, 0xA7, 0xA7 },
4318 { 0x01, 0xB8, 0xA8 },
4319 { 0x00, 0xA9, 0xA9 },
4320 { 0x01, 0xBA, 0xAA },
4321 { 0x00, 0xAB, 0xAB },
4322 { 0x00, 0xAC, 0xAC },
4323 { 0x00, 0xAD, 0xAD },
4324 { 0x00, 0xAE, 0xAE },
4325 { 0x01, 0xBF, 0xAF },
4326 { 0x00, 0xB0, 0xB0 },
4327 { 0x00, 0xB1, 0xB1 },
4328 { 0x00, 0xB2, 0xB2 },
4329 { 0x00, 0xB3, 0xB3 },
4330 { 0x00, 0xB4, 0xB4 },
4331 { 0x00, 0xB5, 0xB5 },
4332 { 0x00, 0xB6, 0xB6 },
4333 { 0x00, 0xB7, 0xB7 },
4334 { 0x00, 0xB8, 0xA8 },
4335 { 0x00, 0xB9, 0xB9 },
4336 { 0x00, 0xBA, 0xAA },
4337 { 0x00, 0xBB, 0xBB },
4338 { 0x00, 0xBC, 0xBC },
4339 { 0x00, 0xBD, 0xBD },
4340 { 0x00, 0xBE, 0xBE },
4341 { 0x00, 0xBF, 0xAF },
4342 { 0x01, 0xE0, 0xC0 },
4343 { 0x01, 0xE1, 0xC1 },
4344 { 0x01, 0xE2, 0xC2 },
4345 { 0x01, 0xE3, 0xC3 },
4346 { 0x01, 0xE4, 0xC4 },
4347 { 0x01, 0xE5, 0xC5 },
4348 { 0x01, 0xE6, 0xC6 },
4349 { 0x01, 0xE7, 0xC7 },
4350 { 0x01, 0xE8, 0xC8 },
4351 { 0x01, 0xE9, 0xC9 },
4352 { 0x01, 0xEA, 0xCA },
4353 { 0x01, 0xEB, 0xCB },
4354 { 0x01, 0xEC, 0xCC },
4355 { 0x01, 0xED, 0xCD },
4356 { 0x01, 0xEE, 0xCE },
4357 { 0x01, 0xEF, 0xCF },
4358 { 0x01, 0xF0, 0xD0 },
4359 { 0x01, 0xF1, 0xD1 },
4360 { 0x01, 0xF2, 0xD2 },
4361 { 0x01, 0xF3, 0xD3 },
4362 { 0x01, 0xF4, 0xD4 },
4363 { 0x01, 0xF5, 0xD5 },
4364 { 0x01, 0xF6, 0xD6 },
4365 { 0x00, 0xD7, 0xD7 },
4366 { 0x01, 0xF8, 0xD8 },
4367 { 0x01, 0xF9, 0xD9 },
4368 { 0x01, 0xFA, 0xDA },
4369 { 0x01, 0xFB, 0xDB },
4370 { 0x01, 0xFC, 0xDC },
4371 { 0x01, 0xFD, 0xDD },
4372 { 0x01, 0xFE, 0xDE },
4373 { 0x00, 0xDF, 0xDF },
4374 { 0x00, 0xE0, 0xC0 },
4375 { 0x00, 0xE1, 0xC1 },
4376 { 0x00, 0xE2, 0xC2 },
4377 { 0x00, 0xE3, 0xC3 },
4378 { 0x00, 0xE4, 0xC4 },
4379 { 0x00, 0xE5, 0xC5 },
4380 { 0x00, 0xE6, 0xC6 },
4381 { 0x00, 0xE7, 0xC7 },
4382 { 0x00, 0xE8, 0xC8 },
4383 { 0x00, 0xE9, 0xC9 },
4384 { 0x00, 0xEA, 0xCA },
4385 { 0x00, 0xEB, 0xCB },
4386 { 0x00, 0xEC, 0xCC },
4387 { 0x00, 0xED, 0xCD },
4388 { 0x00, 0xEE, 0xCE },
4389 { 0x00, 0xEF, 0xCF },
4390 { 0x00, 0xF0, 0xD0 },
4391 { 0x00, 0xF1, 0xD1 },
4392 { 0x00, 0xF2, 0xD2 },
4393 { 0x00, 0xF3, 0xD3 },
4394 { 0x00, 0xF4, 0xD4 },
4395 { 0x00, 0xF5, 0xD5 },
4396 { 0x00, 0xF6, 0xD6 },
4397 { 0x00, 0xF7, 0xF7 },
4398 { 0x00, 0xF8, 0xD8 },
4399 { 0x00, 0xF9, 0xD9 },
4400 { 0x00, 0xFA, 0xDA },
4401 { 0x00, 0xFB, 0xDB },
4402 { 0x00, 0xFC, 0xDC },
4403 { 0x00, 0xFD, 0xDD },
4404 { 0x00, 0xFE, 0xDE },
4405 { 0x00, 0xFF, 0xFF }
4409 struct cs_info iso14_tbl[] = {
4410 { 0x00, 0x00, 0x00 },
4411 { 0x00, 0x01, 0x01 },
4412 { 0x00, 0x02, 0x02 },
4413 { 0x00, 0x03, 0x03 },
4414 { 0x00, 0x04, 0x04 },
4415 { 0x00, 0x05, 0x05 },
4416 { 0x00, 0x06, 0x06 },
4417 { 0x00, 0x07, 0x07 },
4418 { 0x00, 0x08, 0x08 },
4419 { 0x00, 0x09, 0x09 },
4420 { 0x00, 0x0a, 0x0a },
4421 { 0x00, 0x0b, 0x0b },
4422 { 0x00, 0x0c, 0x0c },
4423 { 0x00, 0x0d, 0x0d },
4424 { 0x00, 0x0e, 0x0e },
4425 { 0x00, 0x0f, 0x0f },
4426 { 0x00, 0x10, 0x10 },
4427 { 0x00, 0x11, 0x11 },
4428 { 0x00, 0x12, 0x12 },
4429 { 0x00, 0x13, 0x13 },
4430 { 0x00, 0x14, 0x14 },
4431 { 0x00, 0x15, 0x15 },
4432 { 0x00, 0x16, 0x16 },
4433 { 0x00, 0x17, 0x17 },
4434 { 0x00, 0x18, 0x18 },
4435 { 0x00, 0x19, 0x19 },
4436 { 0x00, 0x1a, 0x1a },
4437 { 0x00, 0x1b, 0x1b },
4438 { 0x00, 0x1c, 0x1c },
4439 { 0x00, 0x1d, 0x1d },
4440 { 0x00, 0x1e, 0x1e },
4441 { 0x00, 0x1f, 0x1f },
4442 { 0x00, 0x20, 0x20 },
4443 { 0x00, 0x21, 0x21 },
4444 { 0x00, 0x22, 0x22 },
4445 { 0x00, 0x23, 0x23 },
4446 { 0x00, 0x24, 0x24 },
4447 { 0x00, 0x25, 0x25 },
4448 { 0x00, 0x26, 0x26 },
4449 { 0x00, 0x27, 0x27 },
4450 { 0x00, 0x28, 0x28 },
4451 { 0x00, 0x29, 0x29 },
4452 { 0x00, 0x2a, 0x2a },
4453 { 0x00, 0x2b, 0x2b },
4454 { 0x00, 0x2c, 0x2c },
4455 { 0x00, 0x2d, 0x2d },
4456 { 0x00, 0x2e, 0x2e },
4457 { 0x00, 0x2f, 0x2f },
4458 { 0x00, 0x30, 0x30 },
4459 { 0x00, 0x31, 0x31 },
4460 { 0x00, 0x32, 0x32 },
4461 { 0x00, 0x33, 0x33 },
4462 { 0x00, 0x34, 0x34 },
4463 { 0x00, 0x35, 0x35 },
4464 { 0x00, 0x36, 0x36 },
4465 { 0x00, 0x37, 0x37 },
4466 { 0x00, 0x38, 0x38 },
4467 { 0x00, 0x39, 0x39 },
4468 { 0x00, 0x3a, 0x3a },
4469 { 0x00, 0x3b, 0x3b },
4470 { 0x00, 0x3c, 0x3c },
4471 { 0x00, 0x3d, 0x3d },
4472 { 0x00, 0x3e, 0x3e },
4473 { 0x00, 0x3f, 0x3f },
4474 { 0x00, 0x40, 0x40 },
4475 { 0x01, 0x61, 0x41 },
4476 { 0x01, 0x62, 0x42 },
4477 { 0x01, 0x63, 0x43 },
4478 { 0x01, 0x64, 0x44 },
4479 { 0x01, 0x65, 0x45 },
4480 { 0x01, 0x66, 0x46 },
4481 { 0x01, 0x67, 0x47 },
4482 { 0x01, 0x68, 0x48 },
4483 { 0x01, 0x69, 0x49 },
4484 { 0x01, 0x6a, 0x4a },
4485 { 0x01, 0x6b, 0x4b },
4486 { 0x01, 0x6c, 0x4c },
4487 { 0x01, 0x6d, 0x4d },
4488 { 0x01, 0x6e, 0x4e },
4489 { 0x01, 0x6f, 0x4f },
4490 { 0x01, 0x70, 0x50 },
4491 { 0x01, 0x71, 0x51 },
4492 { 0x01, 0x72, 0x52 },
4493 { 0x01, 0x73, 0x53 },
4494 { 0x01, 0x74, 0x54 },
4495 { 0x01, 0x75, 0x55 },
4496 { 0x01, 0x76, 0x56 },
4497 { 0x01, 0x77, 0x57 },
4498 { 0x01, 0x78, 0x58 },
4499 { 0x01, 0x79, 0x59 },
4500 { 0x01, 0x7a, 0x5a },
4501 { 0x00, 0x5b, 0x5b },
4502 { 0x00, 0x5c, 0x5c },
4503 { 0x00, 0x5d, 0x5d },
4504 { 0x00, 0x5e, 0x5e },
4505 { 0x00, 0x5f, 0x5f },
4506 { 0x00, 0x60, 0x60 },
4507 { 0x00, 0x61, 0x41 },
4508 { 0x00, 0x62, 0x42 },
4509 { 0x00, 0x63, 0x43 },
4510 { 0x00, 0x64, 0x44 },
4511 { 0x00, 0x65, 0x45 },
4512 { 0x00, 0x66, 0x46 },
4513 { 0x00, 0x67, 0x47 },
4514 { 0x00, 0x68, 0x48 },
4515 { 0x00, 0x69, 0x49 },
4516 { 0x00, 0x6a, 0x4a },
4517 { 0x00, 0x6b, 0x4b },
4518 { 0x00, 0x6c, 0x4c },
4519 { 0x00, 0x6d, 0x4d },
4520 { 0x00, 0x6e, 0x4e },
4521 { 0x00, 0x6f, 0x4f },
4522 { 0x00, 0x70, 0x50 },
4523 { 0x00, 0x71, 0x51 },
4524 { 0x00, 0x72, 0x52 },
4525 { 0x00, 0x73, 0x53 },
4526 { 0x00, 0x74, 0x54 },
4527 { 0x00, 0x75, 0x55 },
4528 { 0x00, 0x76, 0x56 },
4529 { 0x00, 0x77, 0x57 },
4530 { 0x00, 0x78, 0x58 },
4531 { 0x00, 0x79, 0x59 },
4532 { 0x00, 0x7a, 0x5a },
4533 { 0x00, 0x7b, 0x7b },
4534 { 0x00, 0x7c, 0x7c },
4535 { 0x00, 0x7d, 0x7d },
4536 { 0x00, 0x7e, 0x7e },
4537 { 0x00, 0x7f, 0x7f },
4538 { 0x00, 0x80, 0x80 },
4539 { 0x00, 0x81, 0x81 },
4540 { 0x00, 0x82, 0x82 },
4541 { 0x00, 0x83, 0x83 },
4542 { 0x00, 0x84, 0x84 },
4543 { 0x00, 0x85, 0x85 },
4544 { 0x00, 0x86, 0x86 },
4545 { 0x00, 0x87, 0x87 },
4546 { 0x00, 0x88, 0x88 },
4547 { 0x00, 0x89, 0x89 },
4548 { 0x00, 0x8a, 0x8a },
4549 { 0x00, 0x8b, 0x8b },
4550 { 0x00, 0x8c, 0x8c },
4551 { 0x00, 0x8d, 0x8d },
4552 { 0x00, 0x8e, 0x8e },
4553 { 0x00, 0x8f, 0x8f },
4554 { 0x00, 0x90, 0x90 },
4555 { 0x00, 0x91, 0x91 },
4556 { 0x00, 0x92, 0x92 },
4557 { 0x00, 0x93, 0x93 },
4558 { 0x00, 0x94, 0x94 },
4559 { 0x00, 0x95, 0x95 },
4560 { 0x00, 0x96, 0x96 },
4561 { 0x00, 0x97, 0x97 },
4562 { 0x00, 0x98, 0x98 },
4563 { 0x00, 0x99, 0x99 },
4564 { 0x00, 0x9a, 0x9a },
4565 { 0x00, 0x9b, 0x9b },
4566 { 0x00, 0x9c, 0x9c },
4567 { 0x00, 0x9d, 0x9d },
4568 { 0x00, 0x9e, 0x9e },
4569 { 0x00, 0x9f, 0x9f },
4570 { 0x00, 0xa0, 0xa0 },
4571 { 0x01, 0xa2, 0xa1 },
4572 { 0x00, 0xa2, 0xa1 },
4573 { 0x00, 0xa3, 0xa3 },
4574 { 0x01, 0xa5, 0xa4 },
4575 { 0x00, 0xa5, 0xa4 },
4576 { 0x01, 0xa6, 0xab },
4577 { 0x00, 0xa7, 0xa7 },
4578 { 0x01, 0xb8, 0xa8 },
4579 { 0x00, 0xa9, 0xa9 },
4580 { 0x01, 0xba, 0xaa },
4581 { 0x00, 0xab, 0xa6 },
4582 { 0x01, 0xbc, 0xac },
4583 { 0x00, 0xad, 0xad },
4584 { 0x00, 0xae, 0xae },
4585 { 0x01, 0xff, 0xaf },
4586 { 0x01, 0xb1, 0xb0 },
4587 { 0x00, 0xb1, 0xb0 },
4588 { 0x01, 0xb3, 0xb2 },
4589 { 0x00, 0xb3, 0xb2 },
4590 { 0x01, 0xb5, 0xb4 },
4591 { 0x00, 0xb5, 0xb4 },
4592 { 0x00, 0xb6, 0xb6 },
4593 { 0x01, 0xb9, 0xb7 },
4594 { 0x00, 0xb8, 0xa8 },
4595 { 0x00, 0xb9, 0xb6 },
4596 { 0x00, 0xba, 0xaa },
4597 { 0x01, 0xbf, 0xbb },
4598 { 0x00, 0xbc, 0xac },
4599 { 0x01, 0xbe, 0xbd },
4600 { 0x00, 0xbe, 0xbd },
4601 { 0x00, 0xbf, 0xbb },
4602 { 0x01, 0xe0, 0xc0 },
4603 { 0x01, 0xe1, 0xc1 },
4604 { 0x01, 0xe2, 0xc2 },
4605 { 0x01, 0xe3, 0xc3 },
4606 { 0x01, 0xe4, 0xc4 },
4607 { 0x01, 0xe5, 0xc5 },
4608 { 0x01, 0xe6, 0xc6 },
4609 { 0x01, 0xe7, 0xc7 },
4610 { 0x01, 0xe8, 0xc8 },
4611 { 0x01, 0xe9, 0xc9 },
4612 { 0x01, 0xea, 0xca },
4613 { 0x01, 0xeb, 0xcb },
4614 { 0x01, 0xec, 0xcc },
4615 { 0x01, 0xed, 0xcd },
4616 { 0x01, 0xee, 0xce },
4617 { 0x01, 0xef, 0xcf },
4618 { 0x01, 0xf0, 0xd0 },
4619 { 0x01, 0xf1, 0xd1 },
4620 { 0x01, 0xf2, 0xd2 },
4621 { 0x01, 0xf3, 0xd3 },
4622 { 0x01, 0xf4, 0xd4 },
4623 { 0x01, 0xf5, 0xd5 },
4624 { 0x01, 0xf6, 0xd6 },
4625 { 0x01, 0xf7, 0xd7 },
4626 { 0x01, 0xf8, 0xd8 },
4627 { 0x01, 0xf9, 0xd9 },
4628 { 0x01, 0xfa, 0xda },
4629 { 0x01, 0xfb, 0xdb },
4630 { 0x01, 0xfc, 0xdc },
4631 { 0x01, 0xfd, 0xdd },
4632 { 0x01, 0xfe, 0xde },
4633 { 0x00, 0xdf, 0xdf },
4634 { 0x00, 0xe0, 0xc0 },
4635 { 0x00, 0xe1, 0xc1 },
4636 { 0x00, 0xe2, 0xc2 },
4637 { 0x00, 0xe3, 0xc3 },
4638 { 0x00, 0xe4, 0xc4 },
4639 { 0x00, 0xe5, 0xc5 },
4640 { 0x00, 0xe6, 0xc6 },
4641 { 0x00, 0xe7, 0xc7 },
4642 { 0x00, 0xe8, 0xc8 },
4643 { 0x00, 0xe9, 0xc9 },
4644 { 0x00, 0xea, 0xca },
4645 { 0x00, 0xeb, 0xcb },
4646 { 0x00, 0xec, 0xcc },
4647 { 0x00, 0xed, 0xcd },
4648 { 0x00, 0xee, 0xce },
4649 { 0x00, 0xef, 0xcf },
4650 { 0x00, 0xf0, 0xd0 },
4651 { 0x00, 0xf1, 0xd1 },
4652 { 0x00, 0xf2, 0xd2 },
4653 { 0x00, 0xf3, 0xd3 },
4654 { 0x00, 0xf4, 0xd4 },
4655 { 0x00, 0xf5, 0xd5 },
4656 { 0x00, 0xf6, 0xd6 },
4657 { 0x00, 0xf7, 0xd7 },
4658 { 0x00, 0xf8, 0xd8 },
4659 { 0x00, 0xf9, 0xd9 },
4660 { 0x00, 0xfa, 0xda },
4661 { 0x00, 0xfb, 0xdb },
4662 { 0x00, 0xfc, 0xdc },
4663 { 0x00, 0xfd, 0xdd },
4664 { 0x00, 0xfe, 0xde },
4665 { 0x00, 0xff, 0xff }
4668 struct cs_info iso15_tbl[] = {
4669 { 0x00, 0x00, 0x00 },
4670 { 0x00, 0x01, 0x01 },
4671 { 0x00, 0x02, 0x02 },
4672 { 0x00, 0x03, 0x03 },
4673 { 0x00, 0x04, 0x04 },
4674 { 0x00, 0x05, 0x05 },
4675 { 0x00, 0x06, 0x06 },
4676 { 0x00, 0x07, 0x07 },
4677 { 0x00, 0x08, 0x08 },
4678 { 0x00, 0x09, 0x09 },
4679 { 0x00, 0x0a, 0x0a },
4680 { 0x00, 0x0b, 0x0b },
4681 { 0x00, 0x0c, 0x0c },
4682 { 0x00, 0x0d, 0x0d },
4683 { 0x00, 0x0e, 0x0e },
4684 { 0x00, 0x0f, 0x0f },
4685 { 0x00, 0x10, 0x10 },
4686 { 0x00, 0x11, 0x11 },
4687 { 0x00, 0x12, 0x12 },
4688 { 0x00, 0x13, 0x13 },
4689 { 0x00, 0x14, 0x14 },
4690 { 0x00, 0x15, 0x15 },
4691 { 0x00, 0x16, 0x16 },
4692 { 0x00, 0x17, 0x17 },
4693 { 0x00, 0x18, 0x18 },
4694 { 0x00, 0x19, 0x19 },
4695 { 0x00, 0x1a, 0x1a },
4696 { 0x00, 0x1b, 0x1b },
4697 { 0x00, 0x1c, 0x1c },
4698 { 0x00, 0x1d, 0x1d },
4699 { 0x00, 0x1e, 0x1e },
4700 { 0x00, 0x1f, 0x1f },
4701 { 0x00, 0x20, 0x20 },
4702 { 0x00, 0x21, 0x21 },
4703 { 0x00, 0x22, 0x22 },
4704 { 0x00, 0x23, 0x23 },
4705 { 0x00, 0x24, 0x24 },
4706 { 0x00, 0x25, 0x25 },
4707 { 0x00, 0x26, 0x26 },
4708 { 0x00, 0x27, 0x27 },
4709 { 0x00, 0x28, 0x28 },
4710 { 0x00, 0x29, 0x29 },
4711 { 0x00, 0x2a, 0x2a },
4712 { 0x00, 0x2b, 0x2b },
4713 { 0x00, 0x2c, 0x2c },
4714 { 0x00, 0x2d, 0x2d },
4715 { 0x00, 0x2e, 0x2e },
4716 { 0x00, 0x2f, 0x2f },
4717 { 0x00, 0x30, 0x30 },
4718 { 0x00, 0x31, 0x31 },
4719 { 0x00, 0x32, 0x32 },
4720 { 0x00, 0x33, 0x33 },
4721 { 0x00, 0x34, 0x34 },
4722 { 0x00, 0x35, 0x35 },
4723 { 0x00, 0x36, 0x36 },
4724 { 0x00, 0x37, 0x37 },
4725 { 0x00, 0x38, 0x38 },
4726 { 0x00, 0x39, 0x39 },
4727 { 0x00, 0x3a, 0x3a },
4728 { 0x00, 0x3b, 0x3b },
4729 { 0x00, 0x3c, 0x3c },
4730 { 0x00, 0x3d, 0x3d },
4731 { 0x00, 0x3e, 0x3e },
4732 { 0x00, 0x3f, 0x3f },
4733 { 0x00, 0x40, 0x40 },
4734 { 0x01, 0x61, 0x41 },
4735 { 0x01, 0x62, 0x42 },
4736 { 0x01, 0x63, 0x43 },
4737 { 0x01, 0x64, 0x44 },
4738 { 0x01, 0x65, 0x45 },
4739 { 0x01, 0x66, 0x46 },
4740 { 0x01, 0x67, 0x47 },
4741 { 0x01, 0x68, 0x48 },
4742 { 0x01, 0x69, 0x49 },
4743 { 0x01, 0x6a, 0x4a },
4744 { 0x01, 0x6b, 0x4b },
4745 { 0x01, 0x6c, 0x4c },
4746 { 0x01, 0x6d, 0x4d },
4747 { 0x01, 0x6e, 0x4e },
4748 { 0x01, 0x6f, 0x4f },
4749 { 0x01, 0x70, 0x50 },
4750 { 0x01, 0x71, 0x51 },
4751 { 0x01, 0x72, 0x52 },
4752 { 0x01, 0x73, 0x53 },
4753 { 0x01, 0x74, 0x54 },
4754 { 0x01, 0x75, 0x55 },
4755 { 0x01, 0x76, 0x56 },
4756 { 0x01, 0x77, 0x57 },
4757 { 0x01, 0x78, 0x58 },
4758 { 0x01, 0x79, 0x59 },
4759 { 0x01, 0x7a, 0x5a },
4760 { 0x00, 0x5b, 0x5b },
4761 { 0x00, 0x5c, 0x5c },
4762 { 0x00, 0x5d, 0x5d },
4763 { 0x00, 0x5e, 0x5e },
4764 { 0x00, 0x5f, 0x5f },
4765 { 0x00, 0x60, 0x60 },
4766 { 0x00, 0x61, 0x41 },
4767 { 0x00, 0x62, 0x42 },
4768 { 0x00, 0x63, 0x43 },
4769 { 0x00, 0x64, 0x44 },
4770 { 0x00, 0x65, 0x45 },
4771 { 0x00, 0x66, 0x46 },
4772 { 0x00, 0x67, 0x47 },
4773 { 0x00, 0x68, 0x48 },
4774 { 0x00, 0x69, 0x49 },
4775 { 0x00, 0x6a, 0x4a },
4776 { 0x00, 0x6b, 0x4b },
4777 { 0x00, 0x6c, 0x4c },
4778 { 0x00, 0x6d, 0x4d },
4779 { 0x00, 0x6e, 0x4e },
4780 { 0x00, 0x6f, 0x4f },
4781 { 0x00, 0x70, 0x50 },
4782 { 0x00, 0x71, 0x51 },
4783 { 0x00, 0x72, 0x52 },
4784 { 0x00, 0x73, 0x53 },
4785 { 0x00, 0x74, 0x54 },
4786 { 0x00, 0x75, 0x55 },
4787 { 0x00, 0x76, 0x56 },
4788 { 0x00, 0x77, 0x57 },
4789 { 0x00, 0x78, 0x58 },
4790 { 0x00, 0x79, 0x59 },
4791 { 0x00, 0x7a, 0x5a },
4792 { 0x00, 0x7b, 0x7b },
4793 { 0x00, 0x7c, 0x7c },
4794 { 0x00, 0x7d, 0x7d },
4795 { 0x00, 0x7e, 0x7e },
4796 { 0x00, 0x7f, 0x7f },
4797 { 0x00, 0x80, 0x80 },
4798 { 0x00, 0x81, 0x81 },
4799 { 0x00, 0x82, 0x82 },
4800 { 0x00, 0x83, 0x83 },
4801 { 0x00, 0x84, 0x84 },
4802 { 0x00, 0x85, 0x85 },
4803 { 0x00, 0x86, 0x86 },
4804 { 0x00, 0x87, 0x87 },
4805 { 0x00, 0x88, 0x88 },
4806 { 0x00, 0x89, 0x89 },
4807 { 0x00, 0x8a, 0x8a },
4808 { 0x00, 0x8b, 0x8b },
4809 { 0x00, 0x8c, 0x8c },
4810 { 0x00, 0x8d, 0x8d },
4811 { 0x00, 0x8e, 0x8e },
4812 { 0x00, 0x8f, 0x8f },
4813 { 0x00, 0x90, 0x90 },
4814 { 0x00, 0x91, 0x91 },
4815 { 0x00, 0x92, 0x92 },
4816 { 0x00, 0x93, 0x93 },
4817 { 0x00, 0x94, 0x94 },
4818 { 0x00, 0x95, 0x95 },
4819 { 0x00, 0x96, 0x96 },
4820 { 0x00, 0x97, 0x97 },
4821 { 0x00, 0x98, 0x98 },
4822 { 0x00, 0x99, 0x99 },
4823 { 0x00, 0x9a, 0x9a },
4824 { 0x00, 0x9b, 0x9b },
4825 { 0x00, 0x9c, 0x9c },
4826 { 0x00, 0x9d, 0x9d },
4827 { 0x00, 0x9e, 0x9e },
4828 { 0x00, 0x9f, 0x9f },
4829 { 0x00, 0xa0, 0xa0 },
4830 { 0x00, 0xa1, 0xa1 },
4831 { 0x00, 0xa2, 0xa2 },
4832 { 0x00, 0xa3, 0xa3 },
4833 { 0x00, 0xa4, 0xa4 },
4834 { 0x00, 0xa5, 0xa5 },
4835 { 0x01, 0xa8, 0xa6 },
4836 { 0x00, 0xa7, 0xa7 },
4837 { 0x00, 0xa8, 0xa6 },
4838 { 0x00, 0xa9, 0xa9 },
4839 { 0x00, 0xaa, 0xaa },
4840 { 0x00, 0xab, 0xab },
4841 { 0x00, 0xac, 0xac },
4842 { 0x00, 0xad, 0xad },
4843 { 0x00, 0xae, 0xae },
4844 { 0x00, 0xaf, 0xaf },
4845 { 0x00, 0xb0, 0xb0 },
4846 { 0x00, 0xb1, 0xb1 },
4847 { 0x00, 0xb2, 0xb2 },
4848 { 0x00, 0xb3, 0xb3 },
4849 { 0x01, 0xb8, 0xb4 },
4850 { 0x00, 0xb5, 0xb5 },
4851 { 0x00, 0xb6, 0xb6 },
4852 { 0x00, 0xb7, 0xb7 },
4853 { 0x00, 0xb8, 0xb4 },
4854 { 0x00, 0xb9, 0xb9 },
4855 { 0x00, 0xba, 0xba },
4856 { 0x00, 0xbb, 0xbb },
4857 { 0x01, 0xbd, 0xbc },
4858 { 0x00, 0xbd, 0xbc },
4859 { 0x01, 0xff, 0xbe },
4860 { 0x00, 0xbf, 0xbf },
4861 { 0x01, 0xe0, 0xc0 },
4862 { 0x01, 0xe1, 0xc1 },
4863 { 0x01, 0xe2, 0xc2 },
4864 { 0x01, 0xe3, 0xc3 },
4865 { 0x01, 0xe4, 0xc4 },
4866 { 0x01, 0xe5, 0xc5 },
4867 { 0x01, 0xe6, 0xc6 },
4868 { 0x01, 0xe7, 0xc7 },
4869 { 0x01, 0xe8, 0xc8 },
4870 { 0x01, 0xe9, 0xc9 },
4871 { 0x01, 0xea, 0xca },
4872 { 0x01, 0xeb, 0xcb },
4873 { 0x01, 0xec, 0xcc },
4874 { 0x01, 0xed, 0xcd },
4875 { 0x01, 0xee, 0xce },
4876 { 0x01, 0xef, 0xcf },
4877 { 0x01, 0xf0, 0xd0 },
4878 { 0x01, 0xf1, 0xd1 },
4879 { 0x01, 0xf2, 0xd2 },
4880 { 0x01, 0xf3, 0xd3 },
4881 { 0x01, 0xf4, 0xd4 },
4882 { 0x01, 0xf5, 0xd5 },
4883 { 0x01, 0xf6, 0xd6 },
4884 { 0x00, 0xd7, 0xd7 },
4885 { 0x01, 0xf8, 0xd8 },
4886 { 0x01, 0xf9, 0xd9 },
4887 { 0x01, 0xfa, 0xda },
4888 { 0x01, 0xfb, 0xdb },
4889 { 0x01, 0xfc, 0xdc },
4890 { 0x01, 0xfd, 0xdd },
4891 { 0x01, 0xfe, 0xde },
4892 { 0x00, 0xdf, 0xdf },
4893 { 0x00, 0xe0, 0xc0 },
4894 { 0x00, 0xe1, 0xc1 },
4895 { 0x00, 0xe2, 0xc2 },
4896 { 0x00, 0xe3, 0xc3 },
4897 { 0x00, 0xe4, 0xc4 },
4898 { 0x00, 0xe5, 0xc5 },
4899 { 0x00, 0xe6, 0xc6 },
4900 { 0x00, 0xe7, 0xc7 },
4901 { 0x00, 0xe8, 0xc8 },
4902 { 0x00, 0xe9, 0xc9 },
4903 { 0x00, 0xea, 0xca },
4904 { 0x00, 0xeb, 0xcb },
4905 { 0x00, 0xec, 0xcc },
4906 { 0x00, 0xed, 0xcd },
4907 { 0x00, 0xee, 0xce },
4908 { 0x00, 0xef, 0xcf },
4909 { 0x00, 0xf0, 0xd0 },
4910 { 0x00, 0xf1, 0xd1 },
4911 { 0x00, 0xf2, 0xd2 },
4912 { 0x00, 0xf3, 0xd3 },
4913 { 0x00, 0xf4, 0xd4 },
4914 { 0x00, 0xf5, 0xd5 },
4915 { 0x00, 0xf6, 0xd6 },
4916 { 0x00, 0xf7, 0xf7 },
4917 { 0x00, 0xf8, 0xd8 },
4918 { 0x00, 0xf9, 0xd9 },
4919 { 0x00, 0xfa, 0xda },
4920 { 0x00, 0xfb, 0xdb },
4921 { 0x00, 0xfc, 0xdc },
4922 { 0x00, 0xfd, 0xdd },
4923 { 0x00, 0xfe, 0xde },
4924 { 0x00, 0xff, 0xbe }
4927 struct cs_info iscii_devanagari_tbl[] = {
4928 { 0x00, 0x00, 0x00 },
4929 { 0x00, 0x01, 0x01 },
4930 { 0x00, 0x02, 0x02 },
4931 { 0x00, 0x03, 0x03 },
4932 { 0x00, 0x04, 0x04 },
4933 { 0x00, 0x05, 0x05 },
4934 { 0x00, 0x06, 0x06 },
4935 { 0x00, 0x07, 0x07 },
4936 { 0x00, 0x08, 0x08 },
4937 { 0x00, 0x09, 0x09 },
4938 { 0x00, 0x0a, 0x0a },
4939 { 0x00, 0x0b, 0x0b },
4940 { 0x00, 0x0c, 0x0c },
4941 { 0x00, 0x0d, 0x0d },
4942 { 0x00, 0x0e, 0x0e },
4943 { 0x00, 0x0f, 0x0f },
4944 { 0x00, 0x10, 0x10 },
4945 { 0x00, 0x11, 0x11 },
4946 { 0x00, 0x12, 0x12 },
4947 { 0x00, 0x13, 0x13 },
4948 { 0x00, 0x14, 0x14 },
4949 { 0x00, 0x15, 0x15 },
4950 { 0x00, 0x16, 0x16 },
4951 { 0x00, 0x17, 0x17 },
4952 { 0x00, 0x18, 0x18 },
4953 { 0x00, 0x19, 0x19 },
4954 { 0x00, 0x1a, 0x1a },
4955 { 0x00, 0x1b, 0x1b },
4956 { 0x00, 0x1c, 0x1c },
4957 { 0x00, 0x1d, 0x1d },
4958 { 0x00, 0x1e, 0x1e },
4959 { 0x00, 0x1f, 0x1f },
4960 { 0x00, 0x20, 0x20 },
4961 { 0x00, 0x21, 0x21 },
4962 { 0x00, 0x22, 0x22 },
4963 { 0x00, 0x23, 0x23 },
4964 { 0x00, 0x24, 0x24 },
4965 { 0x00, 0x25, 0x25 },
4966 { 0x00, 0x26, 0x26 },
4967 { 0x00, 0x27, 0x27 },
4968 { 0x00, 0x28, 0x28 },
4969 { 0x00, 0x29, 0x29 },
4970 { 0x00, 0x2a, 0x2a },
4971 { 0x00, 0x2b, 0x2b },
4972 { 0x00, 0x2c, 0x2c },
4973 { 0x00, 0x2d, 0x2d },
4974 { 0x00, 0x2e, 0x2e },
4975 { 0x00, 0x2f, 0x2f },
4976 { 0x00, 0x30, 0x30 },
4977 { 0x00, 0x31, 0x31 },
4978 { 0x00, 0x32, 0x32 },
4979 { 0x00, 0x33, 0x33 },
4980 { 0x00, 0x34, 0x34 },
4981 { 0x00, 0x35, 0x35 },
4982 { 0x00, 0x36, 0x36 },
4983 { 0x00, 0x37, 0x37 },
4984 { 0x00, 0x38, 0x38 },
4985 { 0x00, 0x39, 0x39 },
4986 { 0x00, 0x3a, 0x3a },
4987 { 0x00, 0x3b, 0x3b },
4988 { 0x00, 0x3c, 0x3c },
4989 { 0x00, 0x3d, 0x3d },
4990 { 0x00, 0x3e, 0x3e },
4991 { 0x00, 0x3f, 0x3f },
4992 { 0x00, 0x40, 0x40 },
4993 { 0x01, 0x61, 0x41 },
4994 { 0x01, 0x62, 0x42 },
4995 { 0x01, 0x63, 0x43 },
4996 { 0x01, 0x64, 0x44 },
4997 { 0x01, 0x65, 0x45 },
4998 { 0x01, 0x66, 0x46 },
4999 { 0x01, 0x67, 0x47 },
5000 { 0x01, 0x68, 0x48 },
5001 { 0x01, 0x69, 0x49 },
5002 { 0x01, 0x6a, 0x4a },
5003 { 0x01, 0x6b, 0x4b },
5004 { 0x01, 0x6c, 0x4c },
5005 { 0x01, 0x6d, 0x4d },
5006 { 0x01, 0x6e, 0x4e },
5007 { 0x01, 0x6f, 0x4f },
5008 { 0x01, 0x70, 0x50 },
5009 { 0x01, 0x71, 0x51 },
5010 { 0x01, 0x72, 0x52 },
5011 { 0x01, 0x73, 0x53 },
5012 { 0x01, 0x74, 0x54 },
5013 { 0x01, 0x75, 0x55 },
5014 { 0x01, 0x76, 0x56 },
5015 { 0x01, 0x77, 0x57 },
5016 { 0x01, 0x78, 0x58 },
5017 { 0x01, 0x79, 0x59 },
5018 { 0x01, 0x7a, 0x5a },
5019 { 0x00, 0x5b, 0x5b },
5020 { 0x00, 0x5c, 0x5c },
5021 { 0x00, 0x5d, 0x5d },
5022 { 0x00, 0x5e, 0x5e },
5023 { 0x00, 0x5f, 0x5f },
5024 { 0x00, 0x60, 0x60 },
5025 { 0x00, 0x61, 0x41 },
5026 { 0x00, 0x62, 0x42 },
5027 { 0x00, 0x63, 0x43 },
5028 { 0x00, 0x64, 0x44 },
5029 { 0x00, 0x65, 0x45 },
5030 { 0x00, 0x66, 0x46 },
5031 { 0x00, 0x67, 0x47 },
5032 { 0x00, 0x68, 0x48 },
5033 { 0x00, 0x69, 0x49 },
5034 { 0x00, 0x6a, 0x4a },
5035 { 0x00, 0x6b, 0x4b },
5036 { 0x00, 0x6c, 0x4c },
5037 { 0x00, 0x6d, 0x4d },
5038 { 0x00, 0x6e, 0x4e },
5039 { 0x00, 0x6f, 0x4f },
5040 { 0x00, 0x70, 0x50 },
5041 { 0x00, 0x71, 0x51 },
5042 { 0x00, 0x72, 0x52 },
5043 { 0x00, 0x73, 0x53 },
5044 { 0x00, 0x74, 0x54 },
5045 { 0x00, 0x75, 0x55 },
5046 { 0x00, 0x76, 0x56 },
5047 { 0x00, 0x77, 0x57 },
5048 { 0x00, 0x78, 0x58 },
5049 { 0x00, 0x79, 0x59 },
5050 { 0x00, 0x7a, 0x5a },
5051 { 0x00, 0x7b, 0x7b },
5052 { 0x00, 0x7c, 0x7c },
5053 { 0x00, 0x7d, 0x7d },
5054 { 0x00, 0x7e, 0x7e },
5055 { 0x00, 0x7f, 0x7f },
5056 { 0x00, 0x80, 0x80 },
5057 { 0x00, 0x81, 0x81 },
5058 { 0x00, 0x82, 0x82 },
5059 { 0x00, 0x83, 0x83 },
5060 { 0x00, 0x84, 0x84 },
5061 { 0x00, 0x85, 0x85 },
5062 { 0x00, 0x86, 0x86 },
5063 { 0x00, 0x87, 0x87 },
5064 { 0x00, 0x88, 0x88 },
5065 { 0x00, 0x89, 0x89 },
5066 { 0x00, 0x8a, 0x8a },
5067 { 0x00, 0x8b, 0x8b },
5068 { 0x00, 0x8c, 0x8c },
5069 { 0x00, 0x8d, 0x8d },
5070 { 0x00, 0x8e, 0x8e },
5071 { 0x00, 0x8f, 0x8f },
5072 { 0x00, 0x90, 0x90 },
5073 { 0x00, 0x91, 0x91 },
5074 { 0x00, 0x92, 0x92 },
5075 { 0x00, 0x93, 0x93 },
5076 { 0x00, 0x94, 0x94 },
5077 { 0x00, 0x95, 0x95 },
5078 { 0x00, 0x96, 0x96 },
5079 { 0x00, 0x97, 0x97 },
5080 { 0x00, 0x98, 0x98 },
5081 { 0x00, 0x99, 0x99 },
5082 { 0x00, 0x9a, 0x9a },
5083 { 0x00, 0x9b, 0x9b },
5084 { 0x00, 0x9c, 0x9c },
5085 { 0x00, 0x9d, 0x9d },
5086 { 0x00, 0x9e, 0x9e },
5087 { 0x00, 0x9f, 0x9f },
5088 { 0x00, 0xa0, 0xa0 },
5089 { 0x00, 0xa1, 0xa1 },
5090 { 0x00, 0xa2, 0xa2 },
5091 { 0x00, 0xa3, 0xa3 },
5092 { 0x00, 0xa4, 0xa4 },
5093 { 0x00, 0xa5, 0xa5 },
5094 { 0x00, 0xa6, 0xa6 },
5095 { 0x00, 0xa7, 0xa7 },
5096 { 0x00, 0xa8, 0xa8 },
5097 { 0x00, 0xa9, 0xa9 },
5098 { 0x00, 0xaa, 0xaa },
5099 { 0x00, 0xab, 0xab },
5100 { 0x00, 0xac, 0xac },
5101 { 0x00, 0xad, 0xad },
5102 { 0x00, 0xae, 0xae },
5103 { 0x00, 0xaf, 0xaf },
5104 { 0x00, 0xb0, 0xb0 },
5105 { 0x00, 0xb1, 0xb1 },
5106 { 0x00, 0xb2, 0xb2 },
5107 { 0x00, 0xb3, 0xb3 },
5108 { 0x00, 0xb4, 0xb4 },
5109 { 0x00, 0xb5, 0xb5 },
5110 { 0x00, 0xb6, 0xb6 },
5111 { 0x00, 0xb7, 0xb7 },
5112 { 0x00, 0xb8, 0xb8 },
5113 { 0x00, 0xb9, 0xb9 },
5114 { 0x00, 0xba, 0xba },
5115 { 0x00, 0xbb, 0xbb },
5116 { 0x00, 0xbc, 0xbc },
5117 { 0x00, 0xbd, 0xbd },
5118 { 0x00, 0xbe, 0xbe },
5119 { 0x00, 0xbf, 0xbf },
5120 { 0x00, 0xc0, 0xc0 },
5121 { 0x00, 0xc1, 0xc1 },
5122 { 0x00, 0xc2, 0xc2 },
5123 { 0x00, 0xc3, 0xc3 },
5124 { 0x00, 0xc4, 0xc4 },
5125 { 0x00, 0xc5, 0xc5 },
5126 { 0x00, 0xc6, 0xc6 },
5127 { 0x00, 0xc7, 0xc7 },
5128 { 0x00, 0xc8, 0xc8 },
5129 { 0x00, 0xc9, 0xc9 },
5130 { 0x00, 0xca, 0xca },
5131 { 0x00, 0xcb, 0xcb },
5132 { 0x00, 0xcc, 0xcc },
5133 { 0x00, 0xcd, 0xcd },
5134 { 0x00, 0xce, 0xce },
5135 { 0x00, 0xcf, 0xcf },
5136 { 0x00, 0xd0, 0xd0 },
5137 { 0x00, 0xd1, 0xd1 },
5138 { 0x00, 0xd2, 0xd2 },
5139 { 0x00, 0xd3, 0xd3 },
5140 { 0x00, 0xd4, 0xd4 },
5141 { 0x00, 0xd5, 0xd5 },
5142 { 0x00, 0xd6, 0xd6 },
5143 { 0x00, 0xd7, 0xd7 },
5144 { 0x00, 0xd8, 0xd8 },
5145 { 0x00, 0xd9, 0xd9 },
5146 { 0x00, 0xda, 0xda },
5147 { 0x00, 0xdb, 0xdb },
5148 { 0x00, 0xdc, 0xdc },
5149 { 0x00, 0xdd, 0xdd },
5150 { 0x00, 0xde, 0xde },
5151 { 0x00, 0xdf, 0xdf },
5152 { 0x00, 0xe0, 0xe0 },
5153 { 0x00, 0xe1, 0xe1 },
5154 { 0x00, 0xe2, 0xe2 },
5155 { 0x00, 0xe3, 0xe3 },
5156 { 0x00, 0xe4, 0xe4 },
5157 { 0x00, 0xe5, 0xe5 },
5158 { 0x00, 0xe6, 0xe6 },
5159 { 0x00, 0xe7, 0xe7 },
5160 { 0x00, 0xe8, 0xe8 },
5161 { 0x00, 0xe9, 0xe9 },
5162 { 0x00, 0xea, 0xea },
5163 { 0x00, 0xeb, 0xeb },
5164 { 0x00, 0xec, 0xec },
5165 { 0x00, 0xed, 0xed },
5166 { 0x00, 0xee, 0xee },
5167 { 0x00, 0xef, 0xef },
5168 { 0x00, 0xf0, 0xf0 },
5169 { 0x00, 0xf1, 0xf1 },
5170 { 0x00, 0xf2, 0xf2 },
5171 { 0x00, 0xf3, 0xf3 },
5172 { 0x00, 0xf4, 0xf4 },
5173 { 0x00, 0xf5, 0xf5 },
5174 { 0x00, 0xf6, 0xf6 },
5175 { 0x00, 0xf7, 0xf7 },
5176 { 0x00, 0xf8, 0xf8 },
5177 { 0x00, 0xf9, 0xf9 },
5178 { 0x00, 0xfa, 0xfa },
5179 { 0x00, 0xfb, 0xfb },
5180 { 0x00, 0xfc, 0xfc },
5181 { 0x00, 0xfd, 0xfd },
5182 { 0x00, 0xfe, 0xfe },
5183 { 0x00, 0xff, 0xff }
5186 static struct enc_entry encds[] = {
5187 {"ISO8859-1",iso1_tbl},
5188 {"ISO8859-2",iso2_tbl},
5189 {"ISO8859-3",iso3_tbl},
5190 {"ISO8859-4",iso4_tbl},
5191 {"ISO8859-5",iso5_tbl},
5192 {"ISO8859-6",iso6_tbl},
5193 {"ISO8859-7",iso7_tbl},
5194 {"ISO8859-8",iso8_tbl},
5195 {"ISO8859-9",iso9_tbl},
5196 {"ISO8859-10",iso10_tbl},
5197 {"KOI8-R",koi8r_tbl},
5198 {"KOI8-U",koi8u_tbl},
5199 {"microsoft-cp1251",cp1251_tbl},
5200 {"ISO8859-13", iso13_tbl},
5201 {"ISO8859-14", iso14_tbl},
5202 {"ISO8859-15", iso15_tbl},
5203 {"ISCII-DEVANAGARI", iscii_devanagari_tbl}
5206 struct cs_info * get_current_cs(const char * es) {
5207 struct cs_info * ccs = encds[0].cs_table;
5208 int n = sizeof(encds) / sizeof(encds[0]);
5209 for (int i = 0; i < n; i++) {
5210 if (strcmp(es,encds[i].enc_name) == 0) {
5211 ccs = encds[i].cs_table;
5212 break;
5215 return ccs;
5217 #else
5218 // XXX This function was rewritten for mozilla. Instead of storing the
5219 // conversion tables static in this file, create them when needed
5220 // with help the mozilla backend.
5221 struct cs_info * get_current_cs(const char * es) {
5222 struct cs_info *ccs;
5224 nsCOMPtr<nsIUnicodeEncoder> encoder;
5225 nsCOMPtr<nsIUnicodeDecoder> decoder;
5226 nsCOMPtr<nsICaseConversion> caseConv;
5228 nsresult rv;
5229 nsCOMPtr<nsICharsetConverterManager> ccm = do_GetService(kCharsetConverterManagerCID, &rv);
5230 if (NS_FAILED(rv))
5231 return nsnull;
5233 rv = ccm->GetUnicodeEncoder(es, getter_AddRefs(encoder));
5234 if (encoder && NS_SUCCEEDED(rv))
5235 encoder->SetOutputErrorBehavior(encoder->kOnError_Replace, nsnull, '?');
5236 if (NS_FAILED(rv))
5237 return nsnull;
5238 rv = ccm->GetUnicodeDecoder(es, getter_AddRefs(decoder));
5240 caseConv = do_GetService(kUnicharUtilCID, &rv);
5241 if (NS_FAILED(rv))
5242 return nsnull;
5244 ccs = (struct cs_info *) malloc(256 * sizeof(cs_info));
5246 PRInt32 charLength = 256;
5247 PRInt32 uniLength = 512;
5248 char *source = (char *)malloc(charLength * sizeof(char));
5249 PRUnichar *uni = (PRUnichar *)malloc(uniLength * sizeof(PRUnichar));
5250 char *lower = (char *)malloc(charLength * sizeof(char));
5251 char *upper = (char *)malloc(charLength * sizeof(char));
5253 // Create a long string of all chars.
5254 unsigned int i;
5255 for (i = 0x00; i <= 0xff ; ++i) {
5256 source[i] = i;
5259 // Convert this long string to unicode
5260 rv = decoder->Convert(source, &charLength, uni, &uniLength);
5262 // Do case conversion stuff, and convert back.
5263 caseConv->ToUpper(uni, uni, uniLength);
5264 encoder->Convert(uni, &uniLength, upper, &charLength);
5266 uniLength = 512;
5267 charLength = 256;
5268 rv = decoder->Convert(source, &charLength, uni, &uniLength);
5269 caseConv->ToLower(uni, uni, uniLength);
5270 encoder->Convert(uni, &uniLength, lower, &charLength);
5272 // Store
5273 for (i = 0x00; i <= 0xff ; ++i) {
5274 ccs[i].cupper = upper[i];
5275 ccs[i].clower = lower[i];
5277 if (ccs[i].clower != (unsigned char)i)
5278 ccs[i].ccase = true;
5279 else
5280 ccs[i].ccase = false;
5284 free(source);
5285 free(uni);
5286 free(lower);
5287 free(upper);
5289 return ccs;
5291 #endif
5293 // primitive isalpha() replacement for tokenization
5294 char * get_casechars(const char * enc) {
5295 struct cs_info * csconv = get_current_cs(enc);
5296 char expw[MAXLNLEN];
5297 char * p = expw;
5298 for (int i = 0; i <= 255; i++) {
5299 if ((csconv[i].cupper != csconv[i].clower)) {
5300 *p = (char) i;
5301 p++;
5304 *p = '\0';
5305 #ifdef MOZILLA_CLIENT
5306 delete csconv;
5307 #endif
5308 return mystrdup(expw);
5313 struct lang_map lang2enc[] = {
5314 {"ar", "UTF-8", LANG_ar},
5315 {"az", "UTF-8", LANG_az},
5316 {"bg", "microsoft-cp1251", LANG_bg},
5317 {"ca", "ISO8859-1", LANG_ca},
5318 {"cs", "ISO8859-2", LANG_cs},
5319 {"da", "ISO8859-1", LANG_da},
5320 {"de", "ISO8859-1", LANG_de},
5321 {"el", "ISO8859-7", LANG_el},
5322 {"en", "ISO8859-1", LANG_en},
5323 {"es", "ISO8859-1", LANG_es},
5324 {"eu", "ISO8859-1", LANG_eu},
5325 {"gl", "ISO8859-1", LANG_gl},
5326 {"fr", "ISO8859-15", LANG_fr},
5327 {"hr", "ISO8859-2", LANG_hr},
5328 {"hu", "ISO8859-2", LANG_hu},
5329 {"it", "ISO8859-1", LANG_it},
5330 {"la", "ISO8859-1", LANG_la},
5331 {"lv", "ISO8859-13", LANG_lv},
5332 {"nl", "ISO8859-1", LANG_nl},
5333 {"pl", "ISO8859-2", LANG_pl},
5334 {"pt", "ISO8859-1", LANG_pt},
5335 {"sv", "ISO8859-1", LANG_sv},
5336 {"tr", "UTF-8", LANG_tr},
5337 {"ru", "KOI8-R", LANG_ru},
5338 {"uk", "KOI8-U", LANG_uk}
5342 const char * get_default_enc(const char * lang) {
5343 int n = sizeof(lang2enc) / sizeof(lang2enc[0]);
5344 for (int i = 0; i < n; i++) {
5345 if (strcmp(lang,lang2enc[i].lang) == 0) {
5346 return lang2enc[i].def_enc;
5349 return NULL;
5352 int get_lang_num(const char * lang) {
5353 int n = sizeof(lang2enc) / sizeof(lang2enc[0]);
5354 for (int i = 0; i < n; i++) {
5355 if (strncmp(lang,lang2enc[i].lang,2) == 0) {
5356 return lang2enc[i].num;
5359 return LANG_xx;
5362 #ifndef OPENOFFICEORG
5363 #ifndef MOZILLA_CLIENT
5364 int initialize_utf_tbl() {
5365 utf_tbl_count++;
5366 if (utf_tbl) return 0;
5367 utf_tbl = (unicode_info2 *) malloc(CONTSIZE * sizeof(unicode_info2));
5368 if (utf_tbl) {
5369 int j;
5370 for (j = 0; j < CONTSIZE; j++) {
5371 utf_tbl[j].cletter = 0;
5372 utf_tbl[j].clower = (unsigned short) j;
5373 utf_tbl[j].cupper = (unsigned short) j;
5375 for (j = 0; j < UTF_LST_LEN; j++) {
5376 utf_tbl[utf_lst[j].c].cletter = 1;
5377 utf_tbl[utf_lst[j].c].clower = utf_lst[j].clower;
5378 utf_tbl[utf_lst[j].c].cupper = utf_lst[j].cupper;
5380 } else return 1;
5381 return 0;
5383 #endif
5384 #endif
5386 void free_utf_tbl() {
5387 if (utf_tbl_count > 0) utf_tbl_count--;
5388 if (utf_tbl && (utf_tbl_count == 0)) {
5389 free(utf_tbl);
5390 utf_tbl = NULL;
5394 #ifdef MOZILLA_CLIENT
5395 static nsCOMPtr<nsICaseConversion>& getcaseConv()
5397 nsresult rv;
5398 static nsCOMPtr<nsICaseConversion> caseConv = do_GetService(kUnicharUtilCID, &rv);
5399 return caseConv;
5401 #endif
5403 unsigned short unicodetoupper(unsigned short c, int langnum)
5405 // In Azeri and Turkish, I and i dictinct letters:
5406 // There are a dotless lower case i pair of upper `I',
5407 // and an upper I with dot pair of lower `i'.
5408 if (c == 0x0069 && ((langnum == LANG_az) || (langnum == LANG_tr)))
5409 return 0x0130;
5410 #ifdef OPENOFFICEORG
5411 return u_toupper(c);
5412 #else
5413 #ifdef MOZILLA_CLIENT
5414 PRUnichar ch2;
5415 getcaseConv()->ToUpper((PRUnichar) c, &ch2);
5416 return ch2;
5417 #else
5418 return (utf_tbl) ? utf_tbl[c].cupper : c;
5419 #endif
5420 #endif
5423 unsigned short unicodetolower(unsigned short c, int langnum)
5425 // In Azeri and Turkish, I and i dictinct letters:
5426 // There are a dotless lower case i pair of upper `I',
5427 // and an upper I with dot pair of lower `i'.
5428 if (c == 0x0049 && ((langnum == LANG_az) || (langnum == LANG_tr)))
5429 return 0x0131;
5430 #ifdef OPENOFFICEORG
5431 return u_tolower(c);
5432 #else
5433 #ifdef MOZILLA_CLIENT
5434 PRUnichar ch2;
5435 getcaseConv()->ToLower((PRUnichar) c, &ch2);
5436 return ch2;
5437 #else
5438 return (utf_tbl) ? utf_tbl[c].clower : c;
5439 #endif
5440 #endif
5443 int unicodeisalpha(unsigned short c)
5445 #ifdef OPENOFFICEORG
5446 return u_isalpha(c);
5447 #else
5448 return (utf_tbl) ? utf_tbl[c].cletter : 0;
5449 #endif
5452 /* get type of capitalization */
5453 int get_captype(char * word, int nl, cs_info * csconv) {
5454 // now determine the capitalization type of the first nl letters
5455 int ncap = 0;
5456 int nneutral = 0;
5457 int firstcap = 0;
5458 if (csconv == NULL) return NOCAP;
5459 for (char * q = word; *q != '\0'; q++) {
5460 if (csconv[*((unsigned char *)q)].ccase) ncap++;
5461 if (csconv[*((unsigned char *)q)].cupper == csconv[*((unsigned char *)q)].clower) nneutral++;
5463 if (ncap) {
5464 firstcap = csconv[*((unsigned char *) word)].ccase;
5467 // now finally set the captype
5468 if (ncap == 0) {
5469 return NOCAP;
5470 } else if ((ncap == 1) && firstcap) {
5471 return INITCAP;
5472 } else if ((ncap == nl) || ((ncap + nneutral) == nl)) {
5473 return ALLCAP;
5474 } else if ((ncap > 1) && firstcap) {
5475 return HUHINITCAP;
5477 return HUHCAP;
5480 int get_captype_utf8(w_char * word, int nl, int langnum) {
5481 // now determine the capitalization type of the first nl letters
5482 int ncap = 0;
5483 int nneutral = 0;
5484 int firstcap = 0;
5485 unsigned short idx;
5486 // don't check too long words
5487 if (nl >= MAXWORDLEN) return 0;
5488 // big Unicode character (non BMP area)
5489 if (nl == -1) return NOCAP;
5490 for (int i = 0; i < nl; i++) {
5491 idx = (word[i].h << 8) + word[i].l;
5492 if (idx != unicodetolower(idx, langnum)) ncap++;
5493 if (unicodetoupper(idx, langnum) == unicodetolower(idx, langnum)) nneutral++;
5495 if (ncap) {
5496 idx = (word[0].h << 8) + word[0].l;
5497 firstcap = (idx != unicodetolower(idx, langnum));
5500 // now finally set the captype
5501 if (ncap == 0) {
5502 return NOCAP;
5503 } else if ((ncap == 1) && firstcap) {
5504 return INITCAP;
5505 } else if ((ncap == nl) || ((ncap + nneutral) == nl)) {
5506 return ALLCAP;
5507 } else if ((ncap > 1) && firstcap) {
5508 return HUHINITCAP;
5510 return HUHCAP;
5514 // strip all ignored characters in the string
5515 void remove_ignored_chars_utf(char * word, unsigned short ignored_chars[], int ignored_len)
5517 w_char w[MAXWORDLEN];
5518 w_char w2[MAXWORDLEN];
5519 int i;
5520 int j;
5521 int len = u8_u16(w, MAXWORDLEN, word);
5522 for (i = 0, j = 0; i < len; i++) {
5523 if (!flag_bsearch(ignored_chars, ((unsigned short *) w)[i], ignored_len)) {
5524 w2[j] = w[i];
5525 j++;
5528 if (j < i) u16_u8(word, MAXWORDUTF8LEN, w2, j);
5531 // strip all ignored characters in the string
5532 void remove_ignored_chars(char * word, char * ignored_chars)
5534 for (char * p = word; *p != '\0'; p++) {
5535 if (!strchr(ignored_chars, *p)) {
5536 *word = *p;
5537 word++;
5540 *word = '\0';
5543 int parse_string(char * line, char ** out, int ln)
5545 char * tp = line;
5546 char * piece;
5547 int i = 0;
5548 int np = 0;
5549 if (*out) {
5550 HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions\n", ln);
5551 return 1;
5553 piece = mystrsep(&tp, 0);
5554 while (piece) {
5555 if (*piece != '\0') {
5556 switch(i) {
5557 case 0: { np++; break; }
5558 case 1: {
5559 *out = mystrdup(piece);
5560 if (!*out) return 1;
5561 np++;
5562 break;
5564 default: break;
5566 i++;
5568 // free(piece);
5569 piece = mystrsep(&tp, 0);
5571 if (np != 2) {
5572 HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", ln);
5573 return 1;
5575 return 0;
5578 int parse_array(char * line, char ** out, unsigned short ** out_utf16,
5579 int * out_utf16_len, int utf8, int ln) {
5580 if (parse_string(line, out, ln)) return 1;
5581 if (utf8) {
5582 w_char w[MAXWORDLEN];
5583 int n = u8_u16(w, MAXWORDLEN, *out);
5584 if (n > 0) {
5585 flag_qsort((unsigned short *) w, 0, n);
5586 *out_utf16 = (unsigned short *) malloc(n * sizeof(unsigned short));
5587 if (!*out_utf16) return 1;
5588 memcpy(*out_utf16, w, n * sizeof(unsigned short));
5590 *out_utf16_len = n;
5592 return 0;