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