extensions/spellcheck/hunspell/src/csutil.cpp

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

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

mercurial