michael@0: /******* BEGIN LICENSE BLOCK ******* michael@0: * Version: MPL 1.1/GPL 2.0/LGPL 2.1 michael@0: * michael@0: * The contents of this file are subject to the Mozilla Public License Version michael@0: * 1.1 (the "License"); you may not use this file except in compliance with michael@0: * the License. You may obtain a copy of the License at michael@0: * http://www.mozilla.org/MPL/ michael@0: * michael@0: * Software distributed under the License is distributed on an "AS IS" basis, michael@0: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License michael@0: * for the specific language governing rights and limitations under the michael@0: * License. michael@0: * michael@0: * The Initial Developers of the Original Code are Kevin Hendricks (MySpell) michael@0: * and László Németh (Hunspell). Portions created by the Initial Developers michael@0: * are Copyright (C) 2002-2005 the Initial Developers. All Rights Reserved. michael@0: * michael@0: * Contributor(s): Kevin Hendricks (kevin.hendricks@sympatico.ca) michael@0: * David Einstein (deinst@world.std.com) michael@0: * László Németh (nemethl@gyorsposta.hu) michael@0: * L. David Baron (dbaron@dbaron.org) michael@0: * Caolan McNamara (caolanm@redhat.com) michael@0: * Davide Prina michael@0: * Giuseppe Modugno michael@0: * Gianluca Turconi michael@0: * Simon Brouwer michael@0: * Noll Janos michael@0: * Biro Arpad michael@0: * Goldman Eleonora michael@0: * Sarlos Tamas michael@0: * Bencsath Boldizsar michael@0: * Halacsy Peter michael@0: * Dvornik Laszlo michael@0: * Gefferth Andras michael@0: * Nagy Viktor michael@0: * Varga Daniel michael@0: * Chris Halls michael@0: * Rene Engelhard michael@0: * Bram Moolenaar michael@0: * Dafydd Jones michael@0: * Harri Pitkanen michael@0: * Andras Timar michael@0: * Tor Lillqvist michael@0: * michael@0: * Alternatively, the contents of this file may be used under the terms of michael@0: * either the GNU General Public License Version 2 or later (the "GPL"), or michael@0: * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), michael@0: * in which case the provisions of the GPL or the LGPL are applicable instead michael@0: * of those above. If you wish to allow use of your version of this file only michael@0: * under the terms of either the GPL or the LGPL, and not to allow others to michael@0: * use your version of this file under the terms of the MPL, indicate your michael@0: * decision by deleting the provisions above and replace them with the notice michael@0: * and other provisions required by the GPL or the LGPL. If you do not delete michael@0: * the provisions above, a recipient may use your version of this file under michael@0: * the terms of any one of the MPL, the GPL or the LGPL. michael@0: * michael@0: ******* END LICENSE BLOCK *******/ michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: #include "csutil.hxx" michael@0: #include "atypes.hxx" michael@0: #include "langnum.hxx" michael@0: michael@0: // Unicode character encoding information michael@0: struct unicode_info { michael@0: unsigned short c; michael@0: unsigned short cupper; michael@0: unsigned short clower; michael@0: }; michael@0: michael@0: #ifdef OPENOFFICEORG michael@0: # include michael@0: #else michael@0: # ifndef MOZILLA_CLIENT michael@0: # include "utf_info.cxx" michael@0: # define UTF_LST_LEN (sizeof(utf_lst) / (sizeof(unicode_info))) michael@0: # endif michael@0: #endif michael@0: michael@0: #ifdef MOZILLA_CLIENT michael@0: #include "nsCOMPtr.h" michael@0: #include "nsServiceManagerUtils.h" michael@0: #include "nsIUnicodeEncoder.h" michael@0: #include "nsIUnicodeDecoder.h" michael@0: #include "nsUnicharUtils.h" michael@0: #include "nsICharsetConverterManager.h" michael@0: michael@0: static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID); michael@0: #endif michael@0: michael@0: struct unicode_info2 { michael@0: char cletter; michael@0: unsigned short cupper; michael@0: unsigned short clower; michael@0: }; michael@0: michael@0: static struct unicode_info2 * utf_tbl = NULL; michael@0: static int utf_tbl_count = 0; // utf_tbl can be used by multiple Hunspell instances michael@0: michael@0: /* only UTF-16 (BMP) implementation */ michael@0: char * u16_u8(char * dest, int size, const w_char * src, int srclen) { michael@0: signed char * u8 = (signed char *)dest; michael@0: signed char * u8_max = (signed char *)(u8 + size); michael@0: const w_char * u2 = src; michael@0: const w_char * u2_max = src + srclen; michael@0: while ((u2 < u2_max) && (u8 < u8_max)) { michael@0: if (u2->h) { // > 0xFF michael@0: // XXX 4-byte haven't implemented yet. michael@0: if (u2->h >= 0x08) { // >= 0x800 (3-byte UTF-8 character) michael@0: *u8 = 0xe0 + (u2->h >> 4); michael@0: u8++; michael@0: if (u8 < u8_max) { michael@0: *u8 = 0x80 + ((u2->h & 0xf) << 2) + (u2->l >> 6); michael@0: u8++; michael@0: if (u8 < u8_max) { michael@0: *u8 = 0x80 + (u2->l & 0x3f); michael@0: u8++; michael@0: } michael@0: } michael@0: } else { // < 0x800 (2-byte UTF-8 character) michael@0: *u8 = 0xc0 + (u2->h << 2) + (u2->l >> 6); michael@0: u8++; michael@0: if (u8 < u8_max) { michael@0: *u8 = 0x80 + (u2->l & 0x3f); michael@0: u8++; michael@0: } michael@0: } michael@0: } else { // <= 0xFF michael@0: if (u2->l & 0x80) { // >0x80 (2-byte UTF-8 character) michael@0: *u8 = 0xc0 + (u2->l >> 6); michael@0: u8++; michael@0: if (u8 < u8_max) { michael@0: *u8 = 0x80 + (u2->l & 0x3f); michael@0: u8++; michael@0: } michael@0: } else { // < 0x80 (1-byte UTF-8 character) michael@0: *u8 = u2->l; michael@0: u8++; michael@0: } michael@0: } michael@0: u2++; michael@0: } michael@0: *u8 = '\0'; michael@0: return dest; michael@0: } michael@0: michael@0: michael@0: /* only UTF-16 (BMP) implementation */ michael@0: int u8_u16(w_char * dest, int size, const char * src) { michael@0: const signed char * u8 = (const signed char *)src; michael@0: w_char * u2 = dest; michael@0: w_char * u2_max = u2 + size; michael@0: michael@0: while ((u2 < u2_max) && *u8) { michael@0: switch ((*u8) & 0xf0) { michael@0: case 0x00: michael@0: case 0x10: michael@0: case 0x20: michael@0: case 0x30: michael@0: case 0x40: michael@0: case 0x50: michael@0: case 0x60: michael@0: case 0x70: { michael@0: u2->h = 0; michael@0: u2->l = *u8; michael@0: break; michael@0: } michael@0: case 0x80: michael@0: case 0x90: michael@0: case 0xa0: michael@0: case 0xb0: { michael@0: HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Unexpected continuation bytes in %ld. character position\n%s\n", static_cast(u8 - (signed char *)src), src); michael@0: u2->h = 0xff; michael@0: u2->l = 0xfd; michael@0: break; michael@0: } michael@0: case 0xc0: michael@0: case 0xd0: { // 2-byte UTF-8 codes michael@0: if ((*(u8+1) & 0xc0) == 0x80) { michael@0: u2->h = (*u8 & 0x1f) >> 2; michael@0: u2->l = (*u8 << 6) + (*(u8+1) & 0x3f); michael@0: u8++; michael@0: } else { michael@0: HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - (signed char *)src), src); michael@0: u2->h = 0xff; michael@0: u2->l = 0xfd; michael@0: } michael@0: break; michael@0: } michael@0: case 0xe0: { // 3-byte UTF-8 codes michael@0: if ((*(u8+1) & 0xc0) == 0x80) { michael@0: u2->h = ((*u8 & 0x0f) << 4) + ((*(u8+1) & 0x3f) >> 2); michael@0: u8++; michael@0: if ((*(u8+1) & 0xc0) == 0x80) { michael@0: u2->l = (*u8 << 6) + (*(u8+1) & 0x3f); michael@0: u8++; michael@0: } else { michael@0: HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - (signed char *)src), src); michael@0: u2->h = 0xff; michael@0: u2->l = 0xfd; michael@0: } michael@0: } else { michael@0: HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast(u8 - (signed char *)src), src); michael@0: u2->h = 0xff; michael@0: u2->l = 0xfd; michael@0: } michael@0: break; michael@0: } michael@0: case 0xf0: { // 4 or more byte UTF-8 codes michael@0: HUNSPELL_WARNING(stderr, "This UTF-8 encoding can't convert to UTF-16:\n%s\n", src); michael@0: u2->h = 0xff; michael@0: u2->l = 0xfd; michael@0: return -1; michael@0: } michael@0: } michael@0: u8++; michael@0: u2++; michael@0: } michael@0: return (int)(u2 - dest); michael@0: } michael@0: michael@0: void flag_qsort(unsigned short flags[], int begin, int end) { michael@0: unsigned short reg; michael@0: if (end > begin) { michael@0: unsigned short pivot = flags[begin]; michael@0: int l = begin + 1; michael@0: int r = end; michael@0: while(l < r) { michael@0: if (flags[l] <= pivot) { michael@0: l++; michael@0: } else { michael@0: r--; michael@0: reg = flags[l]; michael@0: flags[l] = flags[r]; michael@0: flags[r] = reg; michael@0: } michael@0: } michael@0: l--; michael@0: reg = flags[begin]; michael@0: flags[begin] = flags[l]; michael@0: flags[l] = reg; michael@0: michael@0: flag_qsort(flags, begin, l); michael@0: flag_qsort(flags, r, end); michael@0: } michael@0: } michael@0: michael@0: int flag_bsearch(unsigned short flags[], unsigned short flag, int length) { michael@0: int mid; michael@0: int left = 0; michael@0: int right = length - 1; michael@0: while (left <= right) { michael@0: mid = (left + right) / 2; michael@0: if (flags[mid] == flag) return 1; michael@0: if (flag < flags[mid]) right = mid - 1; michael@0: else left = mid + 1; michael@0: } michael@0: return 0; michael@0: } michael@0: michael@0: // strip strings into token based on single char delimiter michael@0: // acts like strsep() but only uses a delim char and not michael@0: // a delim string michael@0: // default delimiter: white space characters michael@0: michael@0: char * mystrsep(char ** stringp, const char delim) michael@0: { michael@0: char * mp = *stringp; michael@0: if (*mp != '\0') { michael@0: char * dp; michael@0: if (delim) { michael@0: dp = strchr(mp, delim); michael@0: } else { michael@0: // don't use isspace() here, the string can be in some random charset michael@0: // that's way different than the locale's michael@0: for (dp = mp; (*dp && *dp != ' ' && *dp != '\t'); dp++); michael@0: if (!*dp) dp = NULL; michael@0: } michael@0: if (dp) { michael@0: *stringp = dp+1; michael@0: *dp = '\0'; michael@0: } else { michael@0: *stringp = mp + strlen(mp); michael@0: } michael@0: return mp; michael@0: } michael@0: return NULL; michael@0: } michael@0: michael@0: // replaces strdup with ansi version michael@0: char * mystrdup(const char * s) michael@0: { michael@0: char * d = NULL; michael@0: if (s) { michael@0: size_t sl = strlen(s)+1; michael@0: d = (char *) malloc(sl); michael@0: if (d) { michael@0: memcpy(d,s,sl); michael@0: } else { michael@0: HUNSPELL_WARNING(stderr, "Can't allocate memory.\n"); michael@0: } michael@0: } michael@0: return d; michael@0: } michael@0: michael@0: // strcat for limited length destination string michael@0: char * mystrcat(char * dest, const char * st, int max) { michael@0: int len; michael@0: int len2; michael@0: if (dest == NULL || st == NULL) return dest; michael@0: len = strlen(dest); michael@0: len2 = strlen(st); michael@0: if (len + len2 + 1 > max) return dest; michael@0: strcpy(dest + len, st); michael@0: return dest; michael@0: } michael@0: michael@0: // remove cross-platform text line end characters michael@0: void mychomp(char * s) michael@0: { michael@0: size_t k = strlen(s); michael@0: if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0'; michael@0: if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0'; michael@0: } michael@0: michael@0: michael@0: // does an ansi strdup of the reverse of a string michael@0: char * myrevstrdup(const char * s) michael@0: { michael@0: char * d = NULL; michael@0: if (s) { michael@0: size_t sl = strlen(s); michael@0: d = (char *) malloc(sl+1); michael@0: if (d) { michael@0: const char * p = s + sl - 1; michael@0: char * q = d; michael@0: while (p >= s) *q++ = *p--; michael@0: *q = '\0'; michael@0: } else { michael@0: HUNSPELL_WARNING(stderr, "Can't allocate memory.\n"); michael@0: } michael@0: } michael@0: return d; michael@0: } michael@0: michael@0: // break text to lines michael@0: // return number of lines michael@0: int line_tok(const char * text, char *** lines, char breakchar) { michael@0: int linenum = 0; michael@0: if (!text) { michael@0: return linenum; michael@0: } michael@0: char * dup = mystrdup(text); michael@0: char * p = strchr(dup, breakchar); michael@0: while (p) { michael@0: linenum++; michael@0: *p = '\0'; michael@0: p++; michael@0: p = strchr(p, breakchar); michael@0: } michael@0: linenum++; michael@0: *lines = (char **) malloc(linenum * sizeof(char *)); michael@0: if (!(*lines)) { michael@0: free(dup); michael@0: return 0; michael@0: } michael@0: michael@0: p = dup; michael@0: int l = 0; michael@0: for (int i = 0; i < linenum; i++) { michael@0: if (*p != '\0') { michael@0: (*lines)[l] = mystrdup(p); michael@0: if (!(*lines)[l]) { michael@0: for (i = 0; i < l; i++) free((*lines)[i]); michael@0: free(dup); michael@0: return 0; michael@0: } michael@0: l++; michael@0: } michael@0: p += strlen(p) + 1; michael@0: } michael@0: free(dup); michael@0: if (!l) free(*lines); michael@0: return l; michael@0: } michael@0: michael@0: // uniq line in place michael@0: char * line_uniq(char * text, char breakchar) { michael@0: char ** lines; michael@0: int linenum = line_tok(text, &lines, breakchar); michael@0: int i; michael@0: strcpy(text, lines[0]); michael@0: for ( i = 1; i < linenum; i++ ) { michael@0: int dup = 0; michael@0: for (int j = 0; j < i; j++) { michael@0: if (strcmp(lines[i], lines[j]) == 0) dup = 1; michael@0: } michael@0: if (!dup) { michael@0: if ((i > 1) || (*(lines[0]) != '\0')) { michael@0: sprintf(text + strlen(text), "%c", breakchar); michael@0: } michael@0: strcat(text, lines[i]); michael@0: } michael@0: } michael@0: for ( i = 0; i < linenum; i++ ) { michael@0: if (lines[i]) free(lines[i]); michael@0: } michael@0: if (lines) free(lines); michael@0: return text; michael@0: } michael@0: michael@0: // uniq and boundary for compound analysis: "1\n\2\n\1" -> " ( \1 | \2 ) " michael@0: char * line_uniq_app(char ** text, char breakchar) { michael@0: if (!strchr(*text, breakchar)) { michael@0: return *text; michael@0: } michael@0: michael@0: char ** lines; michael@0: int i; michael@0: int linenum = line_tok(*text, &lines, breakchar); michael@0: int dup = 0; michael@0: for (i = 0; i < linenum; i++) { michael@0: for (int j = 0; j < (i - 1); j++) { michael@0: if (strcmp(lines[i], lines[j]) == 0) { michael@0: *(lines[i]) = '\0'; michael@0: dup++; michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: if ((linenum - dup) == 1) { michael@0: strcpy(*text, lines[0]); michael@0: freelist(&lines, linenum); michael@0: return *text; michael@0: } michael@0: char * newtext = (char *) malloc(strlen(*text) + 2 * linenum + 3 + 1); michael@0: if (newtext) { michael@0: free(*text); michael@0: *text = newtext; michael@0: } else { michael@0: freelist(&lines, linenum); michael@0: return *text; michael@0: } michael@0: strcpy(*text," ( "); michael@0: for (i = 0; i < linenum; i++) if (*(lines[i])) { michael@0: sprintf(*text + strlen(*text), "%s%s", lines[i], " | "); michael@0: } michael@0: (*text)[strlen(*text) - 2] = ')'; // " ) " michael@0: freelist(&lines, linenum); michael@0: return *text; michael@0: } michael@0: michael@0: // append s to ends of every lines in text michael@0: void strlinecat(char * dest, const char * s) michael@0: { michael@0: char * dup = mystrdup(dest); michael@0: char * source = dup; michael@0: int len = strlen(s); michael@0: if (dup) { michael@0: while (*source) { michael@0: if (*source == '\n') { michael@0: strncpy(dest, s, len); michael@0: dest += len; michael@0: } michael@0: *dest = *source; michael@0: source++; dest++; michael@0: } michael@0: strcpy(dest, s); michael@0: free(dup); michael@0: } michael@0: } michael@0: michael@0: // change \n to char c michael@0: char * tr(char * text, char oldc, char newc) { michael@0: char * p; michael@0: for (p = text; *p; p++) if (*p == oldc) *p = newc; michael@0: return text; michael@0: } michael@0: michael@0: // morphcmp(): compare MORPH_DERI_SFX, MORPH_INFL_SFX and MORPH_TERM_SFX fields michael@0: // in the first line of the inputs michael@0: // return 0, if inputs equal michael@0: // return 1, if inputs may equal with a secondary suffix michael@0: // otherwise return -1 michael@0: int morphcmp(const char * s, const char * t) michael@0: { michael@0: int se = 0; michael@0: int te = 0; michael@0: const char * sl; michael@0: const char * tl; michael@0: const char * olds; michael@0: const char * oldt; michael@0: if (!s || !t) return 1; michael@0: olds = s; michael@0: sl = strchr(s, '\n'); michael@0: s = strstr(s, MORPH_DERI_SFX); michael@0: if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX); michael@0: if (!s || (sl && sl < s)) { michael@0: s= strstr(olds, MORPH_TERM_SFX); michael@0: olds = NULL; michael@0: } michael@0: oldt = t; michael@0: tl = strchr(t, '\n'); michael@0: t = strstr(t, MORPH_DERI_SFX); michael@0: if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX); michael@0: if (!t || (tl && tl < t)) { michael@0: t = strstr(oldt, MORPH_TERM_SFX); michael@0: oldt = NULL; michael@0: } michael@0: while (s && t && (!sl || sl > s) && (!tl || tl > t)) { michael@0: s += MORPH_TAG_LEN; michael@0: t += MORPH_TAG_LEN; michael@0: se = 0; michael@0: te = 0; michael@0: while ((*s == *t) && !se && !te) { michael@0: s++; michael@0: t++; michael@0: switch(*s) { michael@0: case ' ': michael@0: case '\n': michael@0: case '\t': michael@0: case '\0': se = 1; michael@0: } michael@0: switch(*t) { michael@0: case ' ': michael@0: case '\n': michael@0: case '\t': michael@0: case '\0': te = 1; michael@0: } michael@0: } michael@0: if (!se || !te) { michael@0: // not terminal suffix difference michael@0: if (olds) return -1; michael@0: return 1; michael@0: } michael@0: olds = s; michael@0: s = strstr(s, MORPH_DERI_SFX); michael@0: if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX); michael@0: if (!s || (sl && sl < s)) { michael@0: s = strstr(olds, MORPH_TERM_SFX); michael@0: olds = NULL; michael@0: } michael@0: oldt = t; michael@0: t = strstr(t, MORPH_DERI_SFX); michael@0: if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX); michael@0: if (!t || (tl && tl < t)) { michael@0: t = strstr(oldt, MORPH_TERM_SFX); michael@0: oldt = NULL; michael@0: } michael@0: } michael@0: if (!s && !t && se && te) return 0; michael@0: return 1; michael@0: } michael@0: michael@0: int get_sfxcount(const char * morph) michael@0: { michael@0: if (!morph || !*morph) return 0; michael@0: int n = 0; michael@0: const char * old = morph; michael@0: morph = strstr(morph, MORPH_DERI_SFX); michael@0: if (!morph) morph = strstr(old, MORPH_INFL_SFX); michael@0: if (!morph) morph = strstr(old, MORPH_TERM_SFX); michael@0: while (morph) { michael@0: n++; michael@0: old = morph; michael@0: morph = strstr(morph + 1, MORPH_DERI_SFX); michael@0: if (!morph) morph = strstr(old + 1, MORPH_INFL_SFX); michael@0: if (!morph) morph = strstr(old + 1, MORPH_TERM_SFX); michael@0: } michael@0: return n; michael@0: } michael@0: michael@0: michael@0: int fieldlen(const char * r) michael@0: { michael@0: int n = 0; michael@0: while (r && *r != ' ' && *r != '\t' && *r != '\0' && *r != '\n') { michael@0: r++; michael@0: n++; michael@0: } michael@0: return n; michael@0: } michael@0: michael@0: char * copy_field(char * dest, const char * morph, const char * var) michael@0: { michael@0: if (!morph) return NULL; michael@0: const char * beg = strstr(morph, var); michael@0: if (beg) { michael@0: char * d = dest; michael@0: for (beg += MORPH_TAG_LEN; *beg != ' ' && *beg != '\t' && michael@0: *beg != '\n' && *beg != '\0'; d++, beg++) { michael@0: *d = *beg; michael@0: } michael@0: *d = '\0'; michael@0: return dest; michael@0: } michael@0: return NULL; michael@0: } michael@0: michael@0: char * mystrrep(char * word, const char * pat, const char * rep) { michael@0: char * pos = strstr(word, pat); michael@0: if (pos) { michael@0: int replen = strlen(rep); michael@0: int patlen = strlen(pat); michael@0: while (pos) { michael@0: if (replen < patlen) { michael@0: char * end = word + strlen(word); michael@0: char * next = pos + replen; michael@0: char * prev = pos + strlen(pat); michael@0: for (; prev < end; *next = *prev, prev++, next++); michael@0: *next = '\0'; michael@0: } else if (replen > patlen) { michael@0: char * end = pos + patlen; michael@0: char * next = word + strlen(word) + replen - patlen; michael@0: char * prev = next - replen + patlen; michael@0: for (; prev >= end; *next = *prev, prev--, next--); michael@0: } michael@0: strncpy(pos, rep, replen); michael@0: pos = strstr(word, pat); michael@0: } michael@0: } michael@0: return word; michael@0: } michael@0: michael@0: // reverse word michael@0: int reverseword(char * word) { michael@0: char r; michael@0: for (char * dest = word + strlen(word) - 1; word < dest; word++, dest--) { michael@0: r=*word; michael@0: *word = *dest; michael@0: *dest = r; michael@0: } michael@0: return 0; michael@0: } michael@0: michael@0: // reverse word (error: 1) michael@0: int reverseword_utf(char * word) { michael@0: w_char w[MAXWORDLEN]; michael@0: w_char * p; michael@0: w_char r; michael@0: int l = u8_u16(w, MAXWORDLEN, word); michael@0: if (l == -1) return 1; michael@0: p = w; michael@0: for (w_char * dest = w + l - 1; p < dest; p++, dest--) { michael@0: r=*p; michael@0: *p = *dest; michael@0: *dest = r; michael@0: } michael@0: u16_u8(word, MAXWORDUTF8LEN, w, l); michael@0: return 0; michael@0: } michael@0: michael@0: int uniqlist(char ** list, int n) { michael@0: int i; michael@0: if (n < 2) return n; michael@0: for (i = 0; i < n; i++) { michael@0: for (int j = 0; j < i; j++) { michael@0: if (list[j] && list[i] && (strcmp(list[j], list[i]) == 0)) { michael@0: free(list[i]); michael@0: list[i] = NULL; michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: int m = 1; michael@0: for (i = 1; i < n; i++) if (list[i]) { michael@0: list[m] = list[i]; michael@0: m++; michael@0: } michael@0: return m; michael@0: } michael@0: michael@0: void freelist(char *** list, int n) { michael@0: if (list && *list && n > 0) { michael@0: for (int i = 0; i < n; i++) if ((*list)[i]) free((*list)[i]); michael@0: free(*list); michael@0: *list = NULL; michael@0: } michael@0: } michael@0: michael@0: // convert null terminated string to all caps michael@0: void mkallcap(char * p, const struct cs_info * csconv) michael@0: { michael@0: while (*p != '\0') { michael@0: *p = csconv[((unsigned char) *p)].cupper; michael@0: p++; michael@0: } michael@0: } michael@0: michael@0: // convert null terminated string to all little michael@0: void mkallsmall(char * p, const struct cs_info * csconv) michael@0: { michael@0: while (*p != '\0') { michael@0: *p = csconv[((unsigned char) *p)].clower; michael@0: p++; michael@0: } michael@0: } michael@0: michael@0: void mkallsmall_utf(w_char * u, int nc, int langnum) { michael@0: for (int i = 0; i < nc; i++) { michael@0: unsigned short idx = (u[i].h << 8) + u[i].l; michael@0: if (idx != unicodetolower(idx, langnum)) { michael@0: u[i].h = (unsigned char) (unicodetolower(idx, langnum) >> 8); michael@0: u[i].l = (unsigned char) (unicodetolower(idx, langnum) & 0x00FF); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void mkallcap_utf(w_char * u, int nc, int langnum) { michael@0: for (int i = 0; i < nc; i++) { michael@0: unsigned short idx = (u[i].h << 8) + u[i].l; michael@0: if (idx != unicodetoupper(idx, langnum)) { michael@0: u[i].h = (unsigned char) (unicodetoupper(idx, langnum) >> 8); michael@0: u[i].l = (unsigned char) (unicodetoupper(idx, langnum) & 0x00FF); michael@0: } michael@0: } michael@0: } michael@0: michael@0: // convert null terminated string to have initial capital michael@0: void mkinitcap(char * p, const struct cs_info * csconv) michael@0: { michael@0: if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper; michael@0: } michael@0: michael@0: // conversion function for protected memory michael@0: void store_pointer(char * dest, char * source) michael@0: { michael@0: memcpy(dest, &source, sizeof(char *)); michael@0: } michael@0: michael@0: // conversion function for protected memory michael@0: char * get_stored_pointer(const char * s) michael@0: { michael@0: char * p; michael@0: memcpy(&p, s, sizeof(char *)); michael@0: return p; michael@0: } michael@0: michael@0: #ifndef MOZILLA_CLIENT michael@0: // convert null terminated string to all caps using encoding michael@0: void enmkallcap(char * d, const char * p, const char * encoding) michael@0: michael@0: { michael@0: struct cs_info * csconv = get_current_cs(encoding); michael@0: while (*p != '\0') { michael@0: *d++ = csconv[((unsigned char) *p)].cupper; michael@0: p++; michael@0: } michael@0: *d = '\0'; michael@0: } michael@0: michael@0: // convert null terminated string to all little using encoding michael@0: void enmkallsmall(char * d, const char * p, const char * encoding) michael@0: { michael@0: struct cs_info * csconv = get_current_cs(encoding); michael@0: while (*p != '\0') { michael@0: *d++ = csconv[((unsigned char) *p)].clower; michael@0: p++; michael@0: } michael@0: *d = '\0'; michael@0: } michael@0: michael@0: // convert null terminated string to have initial capital using encoding michael@0: void enmkinitcap(char * d, const char * p, const char * encoding) michael@0: { michael@0: struct cs_info * csconv = get_current_cs(encoding); michael@0: memcpy(d,p,(strlen(p)+1)); michael@0: if (*p != '\0') *d= csconv[((unsigned char)*p)].cupper; michael@0: } michael@0: michael@0: // these are simple character mappings for the michael@0: // encodings supported michael@0: // supplying isupper, tolower, and toupper michael@0: michael@0: static struct cs_info iso1_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x01, 0xe0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x01, 0xe3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x01, 0xf0, 0xd0 }, michael@0: { 0x01, 0xf1, 0xd1 }, michael@0: { 0x01, 0xf2, 0xd2 }, michael@0: { 0x01, 0xf3, 0xd3 }, michael@0: { 0x01, 0xf4, 0xd4 }, michael@0: { 0x01, 0xf5, 0xd5 }, michael@0: { 0x01, 0xf6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x01, 0xf8, 0xd8 }, michael@0: { 0x01, 0xf9, 0xd9 }, michael@0: { 0x01, 0xfa, 0xda }, michael@0: { 0x01, 0xfb, 0xdb }, michael@0: { 0x01, 0xfc, 0xdc }, michael@0: { 0x01, 0xfd, 0xdd }, michael@0: { 0x01, 0xfe, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xc0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xc3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xd0 }, michael@0: { 0x00, 0xf1, 0xd1 }, michael@0: { 0x00, 0xf2, 0xd2 }, michael@0: { 0x00, 0xf3, 0xd3 }, michael@0: { 0x00, 0xf4, 0xd4 }, michael@0: { 0x00, 0xf5, 0xd5 }, michael@0: { 0x00, 0xf6, 0xd6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xd8 }, michael@0: { 0x00, 0xf9, 0xd9 }, michael@0: { 0x00, 0xfa, 0xda }, michael@0: { 0x00, 0xfb, 0xdb }, michael@0: { 0x00, 0xfc, 0xdc }, michael@0: { 0x00, 0xfd, 0xdd }, michael@0: { 0x00, 0xfe, 0xde }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: michael@0: static struct cs_info iso2_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x01, 0xb1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x01, 0xb3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x01, 0xb5, 0xa5 }, michael@0: { 0x01, 0xb6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x01, 0xb9, 0xa9 }, michael@0: { 0x01, 0xba, 0xaa }, michael@0: { 0x01, 0xbb, 0xab }, michael@0: { 0x01, 0xbc, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x01, 0xbe, 0xae }, michael@0: { 0x01, 0xbf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xa1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xa3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xa5 }, michael@0: { 0x00, 0xb6, 0xa6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xa9 }, michael@0: { 0x00, 0xba, 0xaa }, michael@0: { 0x00, 0xbb, 0xab }, michael@0: { 0x00, 0xbc, 0xac }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xae }, michael@0: { 0x00, 0xbf, 0xaf }, michael@0: { 0x01, 0xe0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x01, 0xe3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x01, 0xf0, 0xd0 }, michael@0: { 0x01, 0xf1, 0xd1 }, michael@0: { 0x01, 0xf2, 0xd2 }, michael@0: { 0x01, 0xf3, 0xd3 }, michael@0: { 0x01, 0xf4, 0xd4 }, michael@0: { 0x01, 0xf5, 0xd5 }, michael@0: { 0x01, 0xf6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x01, 0xf8, 0xd8 }, michael@0: { 0x01, 0xf9, 0xd9 }, michael@0: { 0x01, 0xfa, 0xda }, michael@0: { 0x01, 0xfb, 0xdb }, michael@0: { 0x01, 0xfc, 0xdc }, michael@0: { 0x01, 0xfd, 0xdd }, michael@0: { 0x01, 0xfe, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xc0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xc3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xd0 }, michael@0: { 0x00, 0xf1, 0xd1 }, michael@0: { 0x00, 0xf2, 0xd2 }, michael@0: { 0x00, 0xf3, 0xd3 }, michael@0: { 0x00, 0xf4, 0xd4 }, michael@0: { 0x00, 0xf5, 0xd5 }, michael@0: { 0x00, 0xf6, 0xd6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xd8 }, michael@0: { 0x00, 0xf9, 0xd9 }, michael@0: { 0x00, 0xfa, 0xda }, michael@0: { 0x00, 0xfb, 0xdb }, michael@0: { 0x00, 0xfc, 0xdc }, michael@0: { 0x00, 0xfd, 0xdd }, michael@0: { 0x00, 0xfe, 0xde }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: michael@0: static struct cs_info iso3_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x01, 0xb1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x01, 0xb6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x01, 0x69, 0xa9 }, michael@0: { 0x01, 0xba, 0xaa }, michael@0: { 0x01, 0xbb, 0xab }, michael@0: { 0x01, 0xbc, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x01, 0xbf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xa1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xa6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0x49 }, michael@0: { 0x00, 0xba, 0xaa }, michael@0: { 0x00, 0xbb, 0xab }, michael@0: { 0x00, 0xbc, 0xac }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xaf }, michael@0: { 0x01, 0xe0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x00, 0xc3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x00, 0xd0, 0xd0 }, michael@0: { 0x01, 0xf1, 0xd1 }, michael@0: { 0x01, 0xf2, 0xd2 }, michael@0: { 0x01, 0xf3, 0xd3 }, michael@0: { 0x01, 0xf4, 0xd4 }, michael@0: { 0x01, 0xf5, 0xd5 }, michael@0: { 0x01, 0xf6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x01, 0xf8, 0xd8 }, michael@0: { 0x01, 0xf9, 0xd9 }, michael@0: { 0x01, 0xfa, 0xda }, michael@0: { 0x01, 0xfb, 0xdb }, michael@0: { 0x01, 0xfc, 0xdc }, michael@0: { 0x01, 0xfd, 0xdd }, michael@0: { 0x01, 0xfe, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xc0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xe3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xf0 }, michael@0: { 0x00, 0xf1, 0xd1 }, michael@0: { 0x00, 0xf2, 0xd2 }, michael@0: { 0x00, 0xf3, 0xd3 }, michael@0: { 0x00, 0xf4, 0xd4 }, michael@0: { 0x00, 0xf5, 0xd5 }, michael@0: { 0x00, 0xf6, 0xd6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xd8 }, michael@0: { 0x00, 0xf9, 0xd9 }, michael@0: { 0x00, 0xfa, 0xda }, michael@0: { 0x00, 0xfb, 0xdb }, michael@0: { 0x00, 0xfc, 0xdc }, michael@0: { 0x00, 0xfd, 0xdd }, michael@0: { 0x00, 0xfe, 0xde }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info iso4_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x01, 0xb1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x01, 0xb3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x01, 0xb5, 0xa5 }, michael@0: { 0x01, 0xb6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x01, 0xb9, 0xa9 }, michael@0: { 0x01, 0xba, 0xaa }, michael@0: { 0x01, 0xbb, 0xab }, michael@0: { 0x01, 0xbc, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x01, 0xbe, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xa1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xa3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xa5 }, michael@0: { 0x00, 0xb6, 0xa6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xa9 }, michael@0: { 0x00, 0xba, 0xaa }, michael@0: { 0x00, 0xbb, 0xab }, michael@0: { 0x00, 0xbc, 0xac }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xae }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x01, 0xe0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x01, 0xe3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x01, 0xf0, 0xd0 }, michael@0: { 0x01, 0xf1, 0xd1 }, michael@0: { 0x01, 0xf2, 0xd2 }, michael@0: { 0x01, 0xf3, 0xd3 }, michael@0: { 0x01, 0xf4, 0xd4 }, michael@0: { 0x01, 0xf5, 0xd5 }, michael@0: { 0x01, 0xf6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x01, 0xf8, 0xd8 }, michael@0: { 0x01, 0xf9, 0xd9 }, michael@0: { 0x01, 0xfa, 0xda }, michael@0: { 0x01, 0xfb, 0xdb }, michael@0: { 0x01, 0xfc, 0xdc }, michael@0: { 0x01, 0xfd, 0xdd }, michael@0: { 0x01, 0xfe, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xc0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xc3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xd0 }, michael@0: { 0x00, 0xf1, 0xd1 }, michael@0: { 0x00, 0xf2, 0xd2 }, michael@0: { 0x00, 0xf3, 0xd3 }, michael@0: { 0x00, 0xf4, 0xd4 }, michael@0: { 0x00, 0xf5, 0xd5 }, michael@0: { 0x00, 0xf6, 0xd6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xd8 }, michael@0: { 0x00, 0xf9, 0xd9 }, michael@0: { 0x00, 0xfa, 0xda }, michael@0: { 0x00, 0xfb, 0xdb }, michael@0: { 0x00, 0xfc, 0xdc }, michael@0: { 0x00, 0xfd, 0xdd }, michael@0: { 0x00, 0xfe, 0xde }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info iso5_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x01, 0xf1, 0xa1 }, michael@0: { 0x01, 0xf2, 0xa2 }, michael@0: { 0x01, 0xf3, 0xa3 }, michael@0: { 0x01, 0xf4, 0xa4 }, michael@0: { 0x01, 0xf5, 0xa5 }, michael@0: { 0x01, 0xf6, 0xa6 }, michael@0: { 0x01, 0xf7, 0xa7 }, michael@0: { 0x01, 0xf8, 0xa8 }, michael@0: { 0x01, 0xf9, 0xa9 }, michael@0: { 0x01, 0xfa, 0xaa }, michael@0: { 0x01, 0xfb, 0xab }, michael@0: { 0x01, 0xfc, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x01, 0xfe, 0xae }, michael@0: { 0x01, 0xff, 0xaf }, michael@0: { 0x01, 0xd0, 0xb0 }, michael@0: { 0x01, 0xd1, 0xb1 }, michael@0: { 0x01, 0xd2, 0xb2 }, michael@0: { 0x01, 0xd3, 0xb3 }, michael@0: { 0x01, 0xd4, 0xb4 }, michael@0: { 0x01, 0xd5, 0xb5 }, michael@0: { 0x01, 0xd6, 0xb6 }, michael@0: { 0x01, 0xd7, 0xb7 }, michael@0: { 0x01, 0xd8, 0xb8 }, michael@0: { 0x01, 0xd9, 0xb9 }, michael@0: { 0x01, 0xda, 0xba }, michael@0: { 0x01, 0xdb, 0xbb }, michael@0: { 0x01, 0xdc, 0xbc }, michael@0: { 0x01, 0xdd, 0xbd }, michael@0: { 0x01, 0xde, 0xbe }, michael@0: { 0x01, 0xdf, 0xbf }, michael@0: { 0x01, 0xe0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x01, 0xe3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x00, 0xd0, 0xb0 }, michael@0: { 0x00, 0xd1, 0xb1 }, michael@0: { 0x00, 0xd2, 0xb2 }, michael@0: { 0x00, 0xd3, 0xb3 }, michael@0: { 0x00, 0xd4, 0xb4 }, michael@0: { 0x00, 0xd5, 0xb5 }, michael@0: { 0x00, 0xd6, 0xb6 }, michael@0: { 0x00, 0xd7, 0xb7 }, michael@0: { 0x00, 0xd8, 0xb8 }, michael@0: { 0x00, 0xd9, 0xb9 }, michael@0: { 0x00, 0xda, 0xba }, michael@0: { 0x00, 0xdb, 0xbb }, michael@0: { 0x00, 0xdc, 0xbc }, michael@0: { 0x00, 0xdd, 0xbd }, michael@0: { 0x00, 0xde, 0xbe }, michael@0: { 0x00, 0xdf, 0xbf }, michael@0: { 0x00, 0xe0, 0xc0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xc3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xf0 }, michael@0: { 0x00, 0xf1, 0xa1 }, michael@0: { 0x00, 0xf2, 0xa2 }, michael@0: { 0x00, 0xf3, 0xa3 }, michael@0: { 0x00, 0xf4, 0xa4 }, michael@0: { 0x00, 0xf5, 0xa5 }, michael@0: { 0x00, 0xf6, 0xa6 }, michael@0: { 0x00, 0xf7, 0xa7 }, michael@0: { 0x00, 0xf8, 0xa8 }, michael@0: { 0x00, 0xf9, 0xa9 }, michael@0: { 0x00, 0xfa, 0xaa }, michael@0: { 0x00, 0xfb, 0xab }, michael@0: { 0x00, 0xfc, 0xac }, michael@0: { 0x00, 0xfd, 0xfd }, michael@0: { 0x00, 0xfe, 0xae }, michael@0: { 0x00, 0xff, 0xaf } michael@0: }; michael@0: michael@0: static struct cs_info iso6_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x00, 0xc0, 0xc0 }, michael@0: { 0x00, 0xc1, 0xc1 }, michael@0: { 0x00, 0xc2, 0xc2 }, michael@0: { 0x00, 0xc3, 0xc3 }, michael@0: { 0x00, 0xc4, 0xc4 }, michael@0: { 0x00, 0xc5, 0xc5 }, michael@0: { 0x00, 0xc6, 0xc6 }, michael@0: { 0x00, 0xc7, 0xc7 }, michael@0: { 0x00, 0xc8, 0xc8 }, michael@0: { 0x00, 0xc9, 0xc9 }, michael@0: { 0x00, 0xca, 0xca }, michael@0: { 0x00, 0xcb, 0xcb }, michael@0: { 0x00, 0xcc, 0xcc }, michael@0: { 0x00, 0xcd, 0xcd }, michael@0: { 0x00, 0xce, 0xce }, michael@0: { 0x00, 0xcf, 0xcf }, michael@0: { 0x00, 0xd0, 0xd0 }, michael@0: { 0x00, 0xd1, 0xd1 }, michael@0: { 0x00, 0xd2, 0xd2 }, michael@0: { 0x00, 0xd3, 0xd3 }, michael@0: { 0x00, 0xd4, 0xd4 }, michael@0: { 0x00, 0xd5, 0xd5 }, michael@0: { 0x00, 0xd6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x00, 0xd8, 0xd8 }, michael@0: { 0x00, 0xd9, 0xd9 }, michael@0: { 0x00, 0xda, 0xda }, michael@0: { 0x00, 0xdb, 0xdb }, michael@0: { 0x00, 0xdc, 0xdc }, michael@0: { 0x00, 0xdd, 0xdd }, michael@0: { 0x00, 0xde, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xe0 }, michael@0: { 0x00, 0xe1, 0xe1 }, michael@0: { 0x00, 0xe2, 0xe2 }, michael@0: { 0x00, 0xe3, 0xe3 }, michael@0: { 0x00, 0xe4, 0xe4 }, michael@0: { 0x00, 0xe5, 0xe5 }, michael@0: { 0x00, 0xe6, 0xe6 }, michael@0: { 0x00, 0xe7, 0xe7 }, michael@0: { 0x00, 0xe8, 0xe8 }, michael@0: { 0x00, 0xe9, 0xe9 }, michael@0: { 0x00, 0xea, 0xea }, michael@0: { 0x00, 0xeb, 0xeb }, michael@0: { 0x00, 0xec, 0xec }, michael@0: { 0x00, 0xed, 0xed }, michael@0: { 0x00, 0xee, 0xee }, michael@0: { 0x00, 0xef, 0xef }, michael@0: { 0x00, 0xf0, 0xf0 }, michael@0: { 0x00, 0xf1, 0xf1 }, michael@0: { 0x00, 0xf2, 0xf2 }, michael@0: { 0x00, 0xf3, 0xf3 }, michael@0: { 0x00, 0xf4, 0xf4 }, michael@0: { 0x00, 0xf5, 0xf5 }, michael@0: { 0x00, 0xf6, 0xf6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xf8 }, michael@0: { 0x00, 0xf9, 0xf9 }, michael@0: { 0x00, 0xfa, 0xfa }, michael@0: { 0x00, 0xfb, 0xfb }, michael@0: { 0x00, 0xfc, 0xfc }, michael@0: { 0x00, 0xfd, 0xfd }, michael@0: { 0x00, 0xfe, 0xfe }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info iso7_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x01, 0xdc, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x01, 0xdd, 0xb8 }, michael@0: { 0x01, 0xde, 0xb9 }, michael@0: { 0x01, 0xdf, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x01, 0xfc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x01, 0xfd, 0xbe }, michael@0: { 0x01, 0xfe, 0xbf }, michael@0: { 0x00, 0xc0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x01, 0xe3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x01, 0xf0, 0xd0 }, michael@0: { 0x01, 0xf1, 0xd1 }, michael@0: { 0x00, 0xd2, 0xd2 }, michael@0: { 0x01, 0xf3, 0xd3 }, michael@0: { 0x01, 0xf4, 0xd4 }, michael@0: { 0x01, 0xf5, 0xd5 }, michael@0: { 0x01, 0xf6, 0xd6 }, michael@0: { 0x01, 0xf7, 0xd7 }, michael@0: { 0x01, 0xf8, 0xd8 }, michael@0: { 0x01, 0xf9, 0xd9 }, michael@0: { 0x01, 0xfa, 0xda }, michael@0: { 0x01, 0xfb, 0xdb }, michael@0: { 0x00, 0xdc, 0xb6 }, michael@0: { 0x00, 0xdd, 0xb8 }, michael@0: { 0x00, 0xde, 0xb9 }, michael@0: { 0x00, 0xdf, 0xba }, michael@0: { 0x00, 0xe0, 0xe0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xc3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xd0 }, michael@0: { 0x00, 0xf1, 0xd1 }, michael@0: { 0x00, 0xf2, 0xd3 }, michael@0: { 0x00, 0xf3, 0xd3 }, michael@0: { 0x00, 0xf4, 0xd4 }, michael@0: { 0x00, 0xf5, 0xd5 }, michael@0: { 0x00, 0xf6, 0xd6 }, michael@0: { 0x00, 0xf7, 0xd7 }, michael@0: { 0x00, 0xf8, 0xd8 }, michael@0: { 0x00, 0xf9, 0xd9 }, michael@0: { 0x00, 0xfa, 0xda }, michael@0: { 0x00, 0xfb, 0xdb }, michael@0: { 0x00, 0xfc, 0xbc }, michael@0: { 0x00, 0xfd, 0xbe }, michael@0: { 0x00, 0xfe, 0xbf }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info iso8_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x00, 0xc0, 0xc0 }, michael@0: { 0x00, 0xc1, 0xc1 }, michael@0: { 0x00, 0xc2, 0xc2 }, michael@0: { 0x00, 0xc3, 0xc3 }, michael@0: { 0x00, 0xc4, 0xc4 }, michael@0: { 0x00, 0xc5, 0xc5 }, michael@0: { 0x00, 0xc6, 0xc6 }, michael@0: { 0x00, 0xc7, 0xc7 }, michael@0: { 0x00, 0xc8, 0xc8 }, michael@0: { 0x00, 0xc9, 0xc9 }, michael@0: { 0x00, 0xca, 0xca }, michael@0: { 0x00, 0xcb, 0xcb }, michael@0: { 0x00, 0xcc, 0xcc }, michael@0: { 0x00, 0xcd, 0xcd }, michael@0: { 0x00, 0xce, 0xce }, michael@0: { 0x00, 0xcf, 0xcf }, michael@0: { 0x00, 0xd0, 0xd0 }, michael@0: { 0x00, 0xd1, 0xd1 }, michael@0: { 0x00, 0xd2, 0xd2 }, michael@0: { 0x00, 0xd3, 0xd3 }, michael@0: { 0x00, 0xd4, 0xd4 }, michael@0: { 0x00, 0xd5, 0xd5 }, michael@0: { 0x00, 0xd6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x00, 0xd8, 0xd8 }, michael@0: { 0x00, 0xd9, 0xd9 }, michael@0: { 0x00, 0xda, 0xda }, michael@0: { 0x00, 0xdb, 0xdb }, michael@0: { 0x00, 0xdc, 0xdc }, michael@0: { 0x00, 0xdd, 0xdd }, michael@0: { 0x00, 0xde, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xe0 }, michael@0: { 0x00, 0xe1, 0xe1 }, michael@0: { 0x00, 0xe2, 0xe2 }, michael@0: { 0x00, 0xe3, 0xe3 }, michael@0: { 0x00, 0xe4, 0xe4 }, michael@0: { 0x00, 0xe5, 0xe5 }, michael@0: { 0x00, 0xe6, 0xe6 }, michael@0: { 0x00, 0xe7, 0xe7 }, michael@0: { 0x00, 0xe8, 0xe8 }, michael@0: { 0x00, 0xe9, 0xe9 }, michael@0: { 0x00, 0xea, 0xea }, michael@0: { 0x00, 0xeb, 0xeb }, michael@0: { 0x00, 0xec, 0xec }, michael@0: { 0x00, 0xed, 0xed }, michael@0: { 0x00, 0xee, 0xee }, michael@0: { 0x00, 0xef, 0xef }, michael@0: { 0x00, 0xf0, 0xf0 }, michael@0: { 0x00, 0xf1, 0xf1 }, michael@0: { 0x00, 0xf2, 0xf2 }, michael@0: { 0x00, 0xf3, 0xf3 }, michael@0: { 0x00, 0xf4, 0xf4 }, michael@0: { 0x00, 0xf5, 0xf5 }, michael@0: { 0x00, 0xf6, 0xf6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xf8 }, michael@0: { 0x00, 0xf9, 0xf9 }, michael@0: { 0x00, 0xfa, 0xfa }, michael@0: { 0x00, 0xfb, 0xfb }, michael@0: { 0x00, 0xfc, 0xfc }, michael@0: { 0x00, 0xfd, 0xfd }, michael@0: { 0x00, 0xfe, 0xfe }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info iso9_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0xfd, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0xdd }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x01, 0xe0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x01, 0xe3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x01, 0xf0, 0xd0 }, michael@0: { 0x01, 0xf1, 0xd1 }, michael@0: { 0x01, 0xf2, 0xd2 }, michael@0: { 0x01, 0xf3, 0xd3 }, michael@0: { 0x01, 0xf4, 0xd4 }, michael@0: { 0x01, 0xf5, 0xd5 }, michael@0: { 0x01, 0xf6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x01, 0xf8, 0xd8 }, michael@0: { 0x01, 0xf9, 0xd9 }, michael@0: { 0x01, 0xfa, 0xda }, michael@0: { 0x01, 0xfb, 0xdb }, michael@0: { 0x01, 0xfc, 0xdc }, michael@0: { 0x01, 0x69, 0xdd }, michael@0: { 0x01, 0xfe, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xc0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xc3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xd0 }, michael@0: { 0x00, 0xf1, 0xd1 }, michael@0: { 0x00, 0xf2, 0xd2 }, michael@0: { 0x00, 0xf3, 0xd3 }, michael@0: { 0x00, 0xf4, 0xd4 }, michael@0: { 0x00, 0xf5, 0xd5 }, michael@0: { 0x00, 0xf6, 0xd6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xd8 }, michael@0: { 0x00, 0xf9, 0xd9 }, michael@0: { 0x00, 0xfa, 0xda }, michael@0: { 0x00, 0xfb, 0xdb }, michael@0: { 0x00, 0xfc, 0xdc }, michael@0: { 0x00, 0xfd, 0x49 }, michael@0: { 0x00, 0xfe, 0xde }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info iso10_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x00, 0xc0, 0xc0 }, michael@0: { 0x00, 0xc1, 0xc1 }, michael@0: { 0x00, 0xc2, 0xc2 }, michael@0: { 0x00, 0xc3, 0xc3 }, michael@0: { 0x00, 0xc4, 0xc4 }, michael@0: { 0x00, 0xc5, 0xc5 }, michael@0: { 0x00, 0xc6, 0xc6 }, michael@0: { 0x00, 0xc7, 0xc7 }, michael@0: { 0x00, 0xc8, 0xc8 }, michael@0: { 0x00, 0xc9, 0xc9 }, michael@0: { 0x00, 0xca, 0xca }, michael@0: { 0x00, 0xcb, 0xcb }, michael@0: { 0x00, 0xcc, 0xcc }, michael@0: { 0x00, 0xcd, 0xcd }, michael@0: { 0x00, 0xce, 0xce }, michael@0: { 0x00, 0xcf, 0xcf }, michael@0: { 0x00, 0xd0, 0xd0 }, michael@0: { 0x00, 0xd1, 0xd1 }, michael@0: { 0x00, 0xd2, 0xd2 }, michael@0: { 0x00, 0xd3, 0xd3 }, michael@0: { 0x00, 0xd4, 0xd4 }, michael@0: { 0x00, 0xd5, 0xd5 }, michael@0: { 0x00, 0xd6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x00, 0xd8, 0xd8 }, michael@0: { 0x00, 0xd9, 0xd9 }, michael@0: { 0x00, 0xda, 0xda }, michael@0: { 0x00, 0xdb, 0xdb }, michael@0: { 0x00, 0xdc, 0xdc }, michael@0: { 0x00, 0xdd, 0xdd }, michael@0: { 0x00, 0xde, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xe0 }, michael@0: { 0x00, 0xe1, 0xe1 }, michael@0: { 0x00, 0xe2, 0xe2 }, michael@0: { 0x00, 0xe3, 0xe3 }, michael@0: { 0x00, 0xe4, 0xe4 }, michael@0: { 0x00, 0xe5, 0xe5 }, michael@0: { 0x00, 0xe6, 0xe6 }, michael@0: { 0x00, 0xe7, 0xe7 }, michael@0: { 0x00, 0xe8, 0xe8 }, michael@0: { 0x00, 0xe9, 0xe9 }, michael@0: { 0x00, 0xea, 0xea }, michael@0: { 0x00, 0xeb, 0xeb }, michael@0: { 0x00, 0xec, 0xec }, michael@0: { 0x00, 0xed, 0xed }, michael@0: { 0x00, 0xee, 0xee }, michael@0: { 0x00, 0xef, 0xef }, michael@0: { 0x00, 0xf0, 0xf0 }, michael@0: { 0x00, 0xf1, 0xf1 }, michael@0: { 0x00, 0xf2, 0xf2 }, michael@0: { 0x00, 0xf3, 0xf3 }, michael@0: { 0x00, 0xf4, 0xf4 }, michael@0: { 0x00, 0xf5, 0xf5 }, michael@0: { 0x00, 0xf6, 0xf6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xf8 }, michael@0: { 0x00, 0xf9, 0xf9 }, michael@0: { 0x00, 0xfa, 0xfa }, michael@0: { 0x00, 0xfb, 0xfb }, michael@0: { 0x00, 0xfc, 0xfc }, michael@0: { 0x00, 0xfd, 0xfd }, michael@0: { 0x00, 0xfe, 0xfe }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info koi8r_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xb3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x01, 0xa3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x00, 0xc0, 0xe0 }, michael@0: { 0x00, 0xc1, 0xe1 }, michael@0: { 0x00, 0xc2, 0xe2 }, michael@0: { 0x00, 0xc3, 0xe3 }, michael@0: { 0x00, 0xc4, 0xe4 }, michael@0: { 0x00, 0xc5, 0xe5 }, michael@0: { 0x00, 0xc6, 0xe6 }, michael@0: { 0x00, 0xc7, 0xe7 }, michael@0: { 0x00, 0xc8, 0xe8 }, michael@0: { 0x00, 0xc9, 0xe9 }, michael@0: { 0x00, 0xca, 0xea }, michael@0: { 0x00, 0xcb, 0xeb }, michael@0: { 0x00, 0xcc, 0xec }, michael@0: { 0x00, 0xcd, 0xed }, michael@0: { 0x00, 0xce, 0xee }, michael@0: { 0x00, 0xcf, 0xef }, michael@0: { 0x00, 0xd0, 0xf0 }, michael@0: { 0x00, 0xd1, 0xf1 }, michael@0: { 0x00, 0xd2, 0xf2 }, michael@0: { 0x00, 0xd3, 0xf3 }, michael@0: { 0x00, 0xd4, 0xf4 }, michael@0: { 0x00, 0xd5, 0xf5 }, michael@0: { 0x00, 0xd6, 0xf6 }, michael@0: { 0x00, 0xd7, 0xf7 }, michael@0: { 0x00, 0xd8, 0xf8 }, michael@0: { 0x00, 0xd9, 0xf9 }, michael@0: { 0x00, 0xda, 0xfa }, michael@0: { 0x00, 0xdb, 0xfb }, michael@0: { 0x00, 0xdc, 0xfc }, michael@0: { 0x00, 0xdd, 0xfd }, michael@0: { 0x00, 0xde, 0xfe }, michael@0: { 0x00, 0xdf, 0xff }, michael@0: { 0x01, 0xc0, 0xe0 }, michael@0: { 0x01, 0xc1, 0xe1 }, michael@0: { 0x01, 0xc2, 0xe2 }, michael@0: { 0x01, 0xc3, 0xe3 }, michael@0: { 0x01, 0xc4, 0xe4 }, michael@0: { 0x01, 0xc5, 0xe5 }, michael@0: { 0x01, 0xc6, 0xe6 }, michael@0: { 0x01, 0xc7, 0xe7 }, michael@0: { 0x01, 0xc8, 0xe8 }, michael@0: { 0x01, 0xc9, 0xe9 }, michael@0: { 0x01, 0xca, 0xea }, michael@0: { 0x01, 0xcb, 0xeb }, michael@0: { 0x01, 0xcc, 0xec }, michael@0: { 0x01, 0xcd, 0xed }, michael@0: { 0x01, 0xce, 0xee }, michael@0: { 0x01, 0xcf, 0xef }, michael@0: { 0x01, 0xd0, 0xf0 }, michael@0: { 0x01, 0xd1, 0xf1 }, michael@0: { 0x01, 0xd2, 0xf2 }, michael@0: { 0x01, 0xd3, 0xf3 }, michael@0: { 0x01, 0xd4, 0xf4 }, michael@0: { 0x01, 0xd5, 0xf5 }, michael@0: { 0x01, 0xd6, 0xf6 }, michael@0: { 0x01, 0xd7, 0xf7 }, michael@0: { 0x01, 0xd8, 0xf8 }, michael@0: { 0x01, 0xd9, 0xf9 }, michael@0: { 0x01, 0xda, 0xfa }, michael@0: { 0x01, 0xdb, 0xfb }, michael@0: { 0x01, 0xdc, 0xfc }, michael@0: { 0x01, 0xdd, 0xfd }, michael@0: { 0x01, 0xde, 0xfe }, michael@0: { 0x01, 0xdf, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info koi8u_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xb3 }, michael@0: { 0x00, 0xa4, 0xb4 }, /* ie */ michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xb6 }, /* i */ michael@0: { 0x00, 0xa7, 0xb7 }, /* ii */ michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xbd }, /* g'' */ michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x01, 0xa3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, /* IE */ michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, /* I */ michael@0: { 0x00, 0xb7, 0xb7 }, /* II */ michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x00, 0xc0, 0xe0 }, michael@0: { 0x00, 0xc1, 0xe1 }, michael@0: { 0x00, 0xc2, 0xe2 }, michael@0: { 0x00, 0xc3, 0xe3 }, michael@0: { 0x00, 0xc4, 0xe4 }, michael@0: { 0x00, 0xc5, 0xe5 }, michael@0: { 0x00, 0xc6, 0xe6 }, michael@0: { 0x00, 0xc7, 0xe7 }, michael@0: { 0x00, 0xc8, 0xe8 }, michael@0: { 0x00, 0xc9, 0xe9 }, michael@0: { 0x00, 0xca, 0xea }, michael@0: { 0x00, 0xcb, 0xeb }, michael@0: { 0x00, 0xcc, 0xec }, michael@0: { 0x00, 0xcd, 0xed }, michael@0: { 0x00, 0xce, 0xee }, michael@0: { 0x00, 0xcf, 0xef }, michael@0: { 0x00, 0xd0, 0xf0 }, michael@0: { 0x00, 0xd1, 0xf1 }, michael@0: { 0x00, 0xd2, 0xf2 }, michael@0: { 0x00, 0xd3, 0xf3 }, michael@0: { 0x00, 0xd4, 0xf4 }, michael@0: { 0x00, 0xd5, 0xf5 }, michael@0: { 0x00, 0xd6, 0xf6 }, michael@0: { 0x00, 0xd7, 0xf7 }, michael@0: { 0x00, 0xd8, 0xf8 }, michael@0: { 0x00, 0xd9, 0xf9 }, michael@0: { 0x00, 0xda, 0xfa }, michael@0: { 0x00, 0xdb, 0xfb }, michael@0: { 0x00, 0xdc, 0xfc }, michael@0: { 0x00, 0xdd, 0xfd }, michael@0: { 0x00, 0xde, 0xfe }, michael@0: { 0x00, 0xdf, 0xff }, michael@0: { 0x01, 0xc0, 0xe0 }, michael@0: { 0x01, 0xc1, 0xe1 }, michael@0: { 0x01, 0xc2, 0xe2 }, michael@0: { 0x01, 0xc3, 0xe3 }, michael@0: { 0x01, 0xc4, 0xe4 }, michael@0: { 0x01, 0xc5, 0xe5 }, michael@0: { 0x01, 0xc6, 0xe6 }, michael@0: { 0x01, 0xc7, 0xe7 }, michael@0: { 0x01, 0xc8, 0xe8 }, michael@0: { 0x01, 0xc9, 0xe9 }, michael@0: { 0x01, 0xca, 0xea }, michael@0: { 0x01, 0xcb, 0xeb }, michael@0: { 0x01, 0xcc, 0xec }, michael@0: { 0x01, 0xcd, 0xed }, michael@0: { 0x01, 0xce, 0xee }, michael@0: { 0x01, 0xcf, 0xef }, michael@0: { 0x01, 0xd0, 0xf0 }, michael@0: { 0x01, 0xd1, 0xf1 }, michael@0: { 0x01, 0xd2, 0xf2 }, michael@0: { 0x01, 0xd3, 0xf3 }, michael@0: { 0x01, 0xd4, 0xf4 }, michael@0: { 0x01, 0xd5, 0xf5 }, michael@0: { 0x01, 0xd6, 0xf6 }, michael@0: { 0x01, 0xd7, 0xf7 }, michael@0: { 0x01, 0xd8, 0xf8 }, michael@0: { 0x01, 0xd9, 0xf9 }, michael@0: { 0x01, 0xda, 0xfa }, michael@0: { 0x01, 0xdb, 0xfb }, michael@0: { 0x01, 0xdc, 0xfc }, michael@0: { 0x01, 0xdd, 0xfd }, michael@0: { 0x01, 0xde, 0xfe }, michael@0: { 0x01, 0xdf, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info cp1251_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x01, 0x90, 0x80 }, michael@0: { 0x01, 0x83, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x81 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x01, 0x9a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x01, 0x9c, 0x8c }, michael@0: { 0x01, 0x9d, 0x8d }, michael@0: { 0x01, 0x9e, 0x8e }, michael@0: { 0x01, 0x9f, 0x8f }, michael@0: { 0x00, 0x90, 0x80 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x8a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x8c }, michael@0: { 0x00, 0x9d, 0x8d }, michael@0: { 0x00, 0x9e, 0x8e }, michael@0: { 0x00, 0x9f, 0x8f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x01, 0xa2, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa1 }, michael@0: { 0x01, 0xbc, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x01, 0xb4, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x01, 0xb8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x01, 0xba, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x01, 0xbf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x01, 0xb3, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb2 }, michael@0: { 0x00, 0xb4, 0xa5 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xa8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xaa }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xa3 }, michael@0: { 0x01, 0xbe, 0xbd }, michael@0: { 0x00, 0xbe, 0xbd }, michael@0: { 0x00, 0xbf, 0xaf }, michael@0: { 0x01, 0xe0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x01, 0xe3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x01, 0xf0, 0xd0 }, michael@0: { 0x01, 0xf1, 0xd1 }, michael@0: { 0x01, 0xf2, 0xd2 }, michael@0: { 0x01, 0xf3, 0xd3 }, michael@0: { 0x01, 0xf4, 0xd4 }, michael@0: { 0x01, 0xf5, 0xd5 }, michael@0: { 0x01, 0xf6, 0xd6 }, michael@0: { 0x01, 0xf7, 0xd7 }, michael@0: { 0x01, 0xf8, 0xd8 }, michael@0: { 0x01, 0xf9, 0xd9 }, michael@0: { 0x01, 0xfa, 0xda }, michael@0: { 0x01, 0xfb, 0xdb }, michael@0: { 0x01, 0xfc, 0xdc }, michael@0: { 0x01, 0xfd, 0xdd }, michael@0: { 0x01, 0xfe, 0xde }, michael@0: { 0x01, 0xff, 0xdf }, michael@0: { 0x00, 0xe0, 0xc0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xc3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xd0 }, michael@0: { 0x00, 0xf1, 0xd1 }, michael@0: { 0x00, 0xf2, 0xd2 }, michael@0: { 0x00, 0xf3, 0xd3 }, michael@0: { 0x00, 0xf4, 0xd4 }, michael@0: { 0x00, 0xf5, 0xd5 }, michael@0: { 0x00, 0xf6, 0xd6 }, michael@0: { 0x00, 0xf7, 0xd7 }, michael@0: { 0x00, 0xf8, 0xd8 }, michael@0: { 0x00, 0xf9, 0xd9 }, michael@0: { 0x00, 0xfa, 0xda }, michael@0: { 0x00, 0xfb, 0xdb }, michael@0: { 0x00, 0xfc, 0xdc }, michael@0: { 0x00, 0xfd, 0xdd }, michael@0: { 0x00, 0xfe, 0xde }, michael@0: { 0x00, 0xff, 0xdf } michael@0: }; michael@0: michael@0: static struct cs_info iso13_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0A, 0x0A }, michael@0: { 0x00, 0x0B, 0x0B }, michael@0: { 0x00, 0x0C, 0x0C }, michael@0: { 0x00, 0x0D, 0x0D }, michael@0: { 0x00, 0x0E, 0x0E }, michael@0: { 0x00, 0x0F, 0x0F }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1A, 0x1A }, michael@0: { 0x00, 0x1B, 0x1B }, michael@0: { 0x00, 0x1C, 0x1C }, michael@0: { 0x00, 0x1D, 0x1D }, michael@0: { 0x00, 0x1E, 0x1E }, michael@0: { 0x00, 0x1F, 0x1F }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2A, 0x2A }, michael@0: { 0x00, 0x2B, 0x2B }, michael@0: { 0x00, 0x2C, 0x2C }, michael@0: { 0x00, 0x2D, 0x2D }, michael@0: { 0x00, 0x2E, 0x2E }, michael@0: { 0x00, 0x2F, 0x2F }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3A, 0x3A }, michael@0: { 0x00, 0x3B, 0x3B }, michael@0: { 0x00, 0x3C, 0x3C }, michael@0: { 0x00, 0x3D, 0x3D }, michael@0: { 0x00, 0x3E, 0x3E }, michael@0: { 0x00, 0x3F, 0x3F }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6A, 0x4A }, michael@0: { 0x01, 0x6B, 0x4B }, michael@0: { 0x01, 0x6C, 0x4C }, michael@0: { 0x01, 0x6D, 0x4D }, michael@0: { 0x01, 0x6E, 0x4E }, michael@0: { 0x01, 0x6F, 0x4F }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7A, 0x5A }, michael@0: { 0x00, 0x5B, 0x5B }, michael@0: { 0x00, 0x5C, 0x5C }, michael@0: { 0x00, 0x5D, 0x5D }, michael@0: { 0x00, 0x5E, 0x5E }, michael@0: { 0x00, 0x5F, 0x5F }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6A, 0x4A }, michael@0: { 0x00, 0x6B, 0x4B }, michael@0: { 0x00, 0x6C, 0x4C }, michael@0: { 0x00, 0x6D, 0x4D }, michael@0: { 0x00, 0x6E, 0x4E }, michael@0: { 0x00, 0x6F, 0x4F }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7A, 0x5A }, michael@0: { 0x00, 0x7B, 0x7B }, michael@0: { 0x00, 0x7C, 0x7C }, michael@0: { 0x00, 0x7D, 0x7D }, michael@0: { 0x00, 0x7E, 0x7E }, michael@0: { 0x00, 0x7F, 0x7F }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8A, 0x8A }, michael@0: { 0x00, 0x8B, 0x8B }, michael@0: { 0x00, 0x8C, 0x8C }, michael@0: { 0x00, 0x8D, 0x8D }, michael@0: { 0x00, 0x8E, 0x8E }, michael@0: { 0x00, 0x8F, 0x8F }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9A, 0x9A }, michael@0: { 0x00, 0x9B, 0x9B }, michael@0: { 0x00, 0x9C, 0x9C }, michael@0: { 0x00, 0x9D, 0x9D }, michael@0: { 0x00, 0x9E, 0x9E }, michael@0: { 0x00, 0x9F, 0x9F }, michael@0: { 0x00, 0xA0, 0xA0 }, michael@0: { 0x00, 0xA1, 0xA1 }, michael@0: { 0x00, 0xA2, 0xA2 }, michael@0: { 0x00, 0xA3, 0xA3 }, michael@0: { 0x00, 0xA4, 0xA4 }, michael@0: { 0x00, 0xA5, 0xA5 }, michael@0: { 0x00, 0xA6, 0xA6 }, michael@0: { 0x00, 0xA7, 0xA7 }, michael@0: { 0x01, 0xB8, 0xA8 }, michael@0: { 0x00, 0xA9, 0xA9 }, michael@0: { 0x01, 0xBA, 0xAA }, michael@0: { 0x00, 0xAB, 0xAB }, michael@0: { 0x00, 0xAC, 0xAC }, michael@0: { 0x00, 0xAD, 0xAD }, michael@0: { 0x00, 0xAE, 0xAE }, michael@0: { 0x01, 0xBF, 0xAF }, michael@0: { 0x00, 0xB0, 0xB0 }, michael@0: { 0x00, 0xB1, 0xB1 }, michael@0: { 0x00, 0xB2, 0xB2 }, michael@0: { 0x00, 0xB3, 0xB3 }, michael@0: { 0x00, 0xB4, 0xB4 }, michael@0: { 0x00, 0xB5, 0xB5 }, michael@0: { 0x00, 0xB6, 0xB6 }, michael@0: { 0x00, 0xB7, 0xB7 }, michael@0: { 0x00, 0xB8, 0xA8 }, michael@0: { 0x00, 0xB9, 0xB9 }, michael@0: { 0x00, 0xBA, 0xAA }, michael@0: { 0x00, 0xBB, 0xBB }, michael@0: { 0x00, 0xBC, 0xBC }, michael@0: { 0x00, 0xBD, 0xBD }, michael@0: { 0x00, 0xBE, 0xBE }, michael@0: { 0x00, 0xBF, 0xAF }, michael@0: { 0x01, 0xE0, 0xC0 }, michael@0: { 0x01, 0xE1, 0xC1 }, michael@0: { 0x01, 0xE2, 0xC2 }, michael@0: { 0x01, 0xE3, 0xC3 }, michael@0: { 0x01, 0xE4, 0xC4 }, michael@0: { 0x01, 0xE5, 0xC5 }, michael@0: { 0x01, 0xE6, 0xC6 }, michael@0: { 0x01, 0xE7, 0xC7 }, michael@0: { 0x01, 0xE8, 0xC8 }, michael@0: { 0x01, 0xE9, 0xC9 }, michael@0: { 0x01, 0xEA, 0xCA }, michael@0: { 0x01, 0xEB, 0xCB }, michael@0: { 0x01, 0xEC, 0xCC }, michael@0: { 0x01, 0xED, 0xCD }, michael@0: { 0x01, 0xEE, 0xCE }, michael@0: { 0x01, 0xEF, 0xCF }, michael@0: { 0x01, 0xF0, 0xD0 }, michael@0: { 0x01, 0xF1, 0xD1 }, michael@0: { 0x01, 0xF2, 0xD2 }, michael@0: { 0x01, 0xF3, 0xD3 }, michael@0: { 0x01, 0xF4, 0xD4 }, michael@0: { 0x01, 0xF5, 0xD5 }, michael@0: { 0x01, 0xF6, 0xD6 }, michael@0: { 0x00, 0xD7, 0xD7 }, michael@0: { 0x01, 0xF8, 0xD8 }, michael@0: { 0x01, 0xF9, 0xD9 }, michael@0: { 0x01, 0xFA, 0xDA }, michael@0: { 0x01, 0xFB, 0xDB }, michael@0: { 0x01, 0xFC, 0xDC }, michael@0: { 0x01, 0xFD, 0xDD }, michael@0: { 0x01, 0xFE, 0xDE }, michael@0: { 0x00, 0xDF, 0xDF }, michael@0: { 0x00, 0xE0, 0xC0 }, michael@0: { 0x00, 0xE1, 0xC1 }, michael@0: { 0x00, 0xE2, 0xC2 }, michael@0: { 0x00, 0xE3, 0xC3 }, michael@0: { 0x00, 0xE4, 0xC4 }, michael@0: { 0x00, 0xE5, 0xC5 }, michael@0: { 0x00, 0xE6, 0xC6 }, michael@0: { 0x00, 0xE7, 0xC7 }, michael@0: { 0x00, 0xE8, 0xC8 }, michael@0: { 0x00, 0xE9, 0xC9 }, michael@0: { 0x00, 0xEA, 0xCA }, michael@0: { 0x00, 0xEB, 0xCB }, michael@0: { 0x00, 0xEC, 0xCC }, michael@0: { 0x00, 0xED, 0xCD }, michael@0: { 0x00, 0xEE, 0xCE }, michael@0: { 0x00, 0xEF, 0xCF }, michael@0: { 0x00, 0xF0, 0xD0 }, michael@0: { 0x00, 0xF1, 0xD1 }, michael@0: { 0x00, 0xF2, 0xD2 }, michael@0: { 0x00, 0xF3, 0xD3 }, michael@0: { 0x00, 0xF4, 0xD4 }, michael@0: { 0x00, 0xF5, 0xD5 }, michael@0: { 0x00, 0xF6, 0xD6 }, michael@0: { 0x00, 0xF7, 0xF7 }, michael@0: { 0x00, 0xF8, 0xD8 }, michael@0: { 0x00, 0xF9, 0xD9 }, michael@0: { 0x00, 0xFA, 0xDA }, michael@0: { 0x00, 0xFB, 0xDB }, michael@0: { 0x00, 0xFC, 0xDC }, michael@0: { 0x00, 0xFD, 0xDD }, michael@0: { 0x00, 0xFE, 0xDE }, michael@0: { 0x00, 0xFF, 0xFF } michael@0: }; michael@0: michael@0: michael@0: static struct cs_info iso14_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x01, 0xa2, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa1 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x01, 0xa5, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa4 }, michael@0: { 0x01, 0xa6, 0xab }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x01, 0xb8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x01, 0xba, 0xaa }, michael@0: { 0x00, 0xab, 0xa6 }, michael@0: { 0x01, 0xbc, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x01, 0xff, 0xaf }, michael@0: { 0x01, 0xb1, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb0 }, michael@0: { 0x01, 0xb3, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb2 }, michael@0: { 0x01, 0xb5, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb4 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x01, 0xb9, 0xb7 }, michael@0: { 0x00, 0xb8, 0xa8 }, michael@0: { 0x00, 0xb9, 0xb6 }, michael@0: { 0x00, 0xba, 0xaa }, michael@0: { 0x01, 0xbf, 0xbb }, michael@0: { 0x00, 0xbc, 0xac }, michael@0: { 0x01, 0xbe, 0xbd }, michael@0: { 0x00, 0xbe, 0xbd }, michael@0: { 0x00, 0xbf, 0xbb }, michael@0: { 0x01, 0xe0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x01, 0xe3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x01, 0xf0, 0xd0 }, michael@0: { 0x01, 0xf1, 0xd1 }, michael@0: { 0x01, 0xf2, 0xd2 }, michael@0: { 0x01, 0xf3, 0xd3 }, michael@0: { 0x01, 0xf4, 0xd4 }, michael@0: { 0x01, 0xf5, 0xd5 }, michael@0: { 0x01, 0xf6, 0xd6 }, michael@0: { 0x01, 0xf7, 0xd7 }, michael@0: { 0x01, 0xf8, 0xd8 }, michael@0: { 0x01, 0xf9, 0xd9 }, michael@0: { 0x01, 0xfa, 0xda }, michael@0: { 0x01, 0xfb, 0xdb }, michael@0: { 0x01, 0xfc, 0xdc }, michael@0: { 0x01, 0xfd, 0xdd }, michael@0: { 0x01, 0xfe, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xc0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xc3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xd0 }, michael@0: { 0x00, 0xf1, 0xd1 }, michael@0: { 0x00, 0xf2, 0xd2 }, michael@0: { 0x00, 0xf3, 0xd3 }, michael@0: { 0x00, 0xf4, 0xd4 }, michael@0: { 0x00, 0xf5, 0xd5 }, michael@0: { 0x00, 0xf6, 0xd6 }, michael@0: { 0x00, 0xf7, 0xd7 }, michael@0: { 0x00, 0xf8, 0xd8 }, michael@0: { 0x00, 0xf9, 0xd9 }, michael@0: { 0x00, 0xfa, 0xda }, michael@0: { 0x00, 0xfb, 0xdb }, michael@0: { 0x00, 0xfc, 0xdc }, michael@0: { 0x00, 0xfd, 0xdd }, michael@0: { 0x00, 0xfe, 0xde }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info iso15_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x01, 0xa8, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa6 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x01, 0xb8, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb4 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x01, 0xbd, 0xbc }, michael@0: { 0x00, 0xbd, 0xbc }, michael@0: { 0x01, 0xff, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x01, 0xe0, 0xc0 }, michael@0: { 0x01, 0xe1, 0xc1 }, michael@0: { 0x01, 0xe2, 0xc2 }, michael@0: { 0x01, 0xe3, 0xc3 }, michael@0: { 0x01, 0xe4, 0xc4 }, michael@0: { 0x01, 0xe5, 0xc5 }, michael@0: { 0x01, 0xe6, 0xc6 }, michael@0: { 0x01, 0xe7, 0xc7 }, michael@0: { 0x01, 0xe8, 0xc8 }, michael@0: { 0x01, 0xe9, 0xc9 }, michael@0: { 0x01, 0xea, 0xca }, michael@0: { 0x01, 0xeb, 0xcb }, michael@0: { 0x01, 0xec, 0xcc }, michael@0: { 0x01, 0xed, 0xcd }, michael@0: { 0x01, 0xee, 0xce }, michael@0: { 0x01, 0xef, 0xcf }, michael@0: { 0x01, 0xf0, 0xd0 }, michael@0: { 0x01, 0xf1, 0xd1 }, michael@0: { 0x01, 0xf2, 0xd2 }, michael@0: { 0x01, 0xf3, 0xd3 }, michael@0: { 0x01, 0xf4, 0xd4 }, michael@0: { 0x01, 0xf5, 0xd5 }, michael@0: { 0x01, 0xf6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x01, 0xf8, 0xd8 }, michael@0: { 0x01, 0xf9, 0xd9 }, michael@0: { 0x01, 0xfa, 0xda }, michael@0: { 0x01, 0xfb, 0xdb }, michael@0: { 0x01, 0xfc, 0xdc }, michael@0: { 0x01, 0xfd, 0xdd }, michael@0: { 0x01, 0xfe, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xc0 }, michael@0: { 0x00, 0xe1, 0xc1 }, michael@0: { 0x00, 0xe2, 0xc2 }, michael@0: { 0x00, 0xe3, 0xc3 }, michael@0: { 0x00, 0xe4, 0xc4 }, michael@0: { 0x00, 0xe5, 0xc5 }, michael@0: { 0x00, 0xe6, 0xc6 }, michael@0: { 0x00, 0xe7, 0xc7 }, michael@0: { 0x00, 0xe8, 0xc8 }, michael@0: { 0x00, 0xe9, 0xc9 }, michael@0: { 0x00, 0xea, 0xca }, michael@0: { 0x00, 0xeb, 0xcb }, michael@0: { 0x00, 0xec, 0xcc }, michael@0: { 0x00, 0xed, 0xcd }, michael@0: { 0x00, 0xee, 0xce }, michael@0: { 0x00, 0xef, 0xcf }, michael@0: { 0x00, 0xf0, 0xd0 }, michael@0: { 0x00, 0xf1, 0xd1 }, michael@0: { 0x00, 0xf2, 0xd2 }, michael@0: { 0x00, 0xf3, 0xd3 }, michael@0: { 0x00, 0xf4, 0xd4 }, michael@0: { 0x00, 0xf5, 0xd5 }, michael@0: { 0x00, 0xf6, 0xd6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xd8 }, michael@0: { 0x00, 0xf9, 0xd9 }, michael@0: { 0x00, 0xfa, 0xda }, michael@0: { 0x00, 0xfb, 0xdb }, michael@0: { 0x00, 0xfc, 0xdc }, michael@0: { 0x00, 0xfd, 0xdd }, michael@0: { 0x00, 0xfe, 0xde }, michael@0: { 0x00, 0xff, 0xbe } michael@0: }; michael@0: michael@0: static struct cs_info iscii_devanagari_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x00, 0xc0, 0xc0 }, michael@0: { 0x00, 0xc1, 0xc1 }, michael@0: { 0x00, 0xc2, 0xc2 }, michael@0: { 0x00, 0xc3, 0xc3 }, michael@0: { 0x00, 0xc4, 0xc4 }, michael@0: { 0x00, 0xc5, 0xc5 }, michael@0: { 0x00, 0xc6, 0xc6 }, michael@0: { 0x00, 0xc7, 0xc7 }, michael@0: { 0x00, 0xc8, 0xc8 }, michael@0: { 0x00, 0xc9, 0xc9 }, michael@0: { 0x00, 0xca, 0xca }, michael@0: { 0x00, 0xcb, 0xcb }, michael@0: { 0x00, 0xcc, 0xcc }, michael@0: { 0x00, 0xcd, 0xcd }, michael@0: { 0x00, 0xce, 0xce }, michael@0: { 0x00, 0xcf, 0xcf }, michael@0: { 0x00, 0xd0, 0xd0 }, michael@0: { 0x00, 0xd1, 0xd1 }, michael@0: { 0x00, 0xd2, 0xd2 }, michael@0: { 0x00, 0xd3, 0xd3 }, michael@0: { 0x00, 0xd4, 0xd4 }, michael@0: { 0x00, 0xd5, 0xd5 }, michael@0: { 0x00, 0xd6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x00, 0xd8, 0xd8 }, michael@0: { 0x00, 0xd9, 0xd9 }, michael@0: { 0x00, 0xda, 0xda }, michael@0: { 0x00, 0xdb, 0xdb }, michael@0: { 0x00, 0xdc, 0xdc }, michael@0: { 0x00, 0xdd, 0xdd }, michael@0: { 0x00, 0xde, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xe0 }, michael@0: { 0x00, 0xe1, 0xe1 }, michael@0: { 0x00, 0xe2, 0xe2 }, michael@0: { 0x00, 0xe3, 0xe3 }, michael@0: { 0x00, 0xe4, 0xe4 }, michael@0: { 0x00, 0xe5, 0xe5 }, michael@0: { 0x00, 0xe6, 0xe6 }, michael@0: { 0x00, 0xe7, 0xe7 }, michael@0: { 0x00, 0xe8, 0xe8 }, michael@0: { 0x00, 0xe9, 0xe9 }, michael@0: { 0x00, 0xea, 0xea }, michael@0: { 0x00, 0xeb, 0xeb }, michael@0: { 0x00, 0xec, 0xec }, michael@0: { 0x00, 0xed, 0xed }, michael@0: { 0x00, 0xee, 0xee }, michael@0: { 0x00, 0xef, 0xef }, michael@0: { 0x00, 0xf0, 0xf0 }, michael@0: { 0x00, 0xf1, 0xf1 }, michael@0: { 0x00, 0xf2, 0xf2 }, michael@0: { 0x00, 0xf3, 0xf3 }, michael@0: { 0x00, 0xf4, 0xf4 }, michael@0: { 0x00, 0xf5, 0xf5 }, michael@0: { 0x00, 0xf6, 0xf6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xf8 }, michael@0: { 0x00, 0xf9, 0xf9 }, michael@0: { 0x00, 0xfa, 0xfa }, michael@0: { 0x00, 0xfb, 0xfb }, michael@0: { 0x00, 0xfc, 0xfc }, michael@0: { 0x00, 0xfd, 0xfd }, michael@0: { 0x00, 0xfe, 0xfe }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: static struct cs_info tis620_tbl[] = { michael@0: { 0x00, 0x00, 0x00 }, michael@0: { 0x00, 0x01, 0x01 }, michael@0: { 0x00, 0x02, 0x02 }, michael@0: { 0x00, 0x03, 0x03 }, michael@0: { 0x00, 0x04, 0x04 }, michael@0: { 0x00, 0x05, 0x05 }, michael@0: { 0x00, 0x06, 0x06 }, michael@0: { 0x00, 0x07, 0x07 }, michael@0: { 0x00, 0x08, 0x08 }, michael@0: { 0x00, 0x09, 0x09 }, michael@0: { 0x00, 0x0a, 0x0a }, michael@0: { 0x00, 0x0b, 0x0b }, michael@0: { 0x00, 0x0c, 0x0c }, michael@0: { 0x00, 0x0d, 0x0d }, michael@0: { 0x00, 0x0e, 0x0e }, michael@0: { 0x00, 0x0f, 0x0f }, michael@0: { 0x00, 0x10, 0x10 }, michael@0: { 0x00, 0x11, 0x11 }, michael@0: { 0x00, 0x12, 0x12 }, michael@0: { 0x00, 0x13, 0x13 }, michael@0: { 0x00, 0x14, 0x14 }, michael@0: { 0x00, 0x15, 0x15 }, michael@0: { 0x00, 0x16, 0x16 }, michael@0: { 0x00, 0x17, 0x17 }, michael@0: { 0x00, 0x18, 0x18 }, michael@0: { 0x00, 0x19, 0x19 }, michael@0: { 0x00, 0x1a, 0x1a }, michael@0: { 0x00, 0x1b, 0x1b }, michael@0: { 0x00, 0x1c, 0x1c }, michael@0: { 0x00, 0x1d, 0x1d }, michael@0: { 0x00, 0x1e, 0x1e }, michael@0: { 0x00, 0x1f, 0x1f }, michael@0: { 0x00, 0x20, 0x20 }, michael@0: { 0x00, 0x21, 0x21 }, michael@0: { 0x00, 0x22, 0x22 }, michael@0: { 0x00, 0x23, 0x23 }, michael@0: { 0x00, 0x24, 0x24 }, michael@0: { 0x00, 0x25, 0x25 }, michael@0: { 0x00, 0x26, 0x26 }, michael@0: { 0x00, 0x27, 0x27 }, michael@0: { 0x00, 0x28, 0x28 }, michael@0: { 0x00, 0x29, 0x29 }, michael@0: { 0x00, 0x2a, 0x2a }, michael@0: { 0x00, 0x2b, 0x2b }, michael@0: { 0x00, 0x2c, 0x2c }, michael@0: { 0x00, 0x2d, 0x2d }, michael@0: { 0x00, 0x2e, 0x2e }, michael@0: { 0x00, 0x2f, 0x2f }, michael@0: { 0x00, 0x30, 0x30 }, michael@0: { 0x00, 0x31, 0x31 }, michael@0: { 0x00, 0x32, 0x32 }, michael@0: { 0x00, 0x33, 0x33 }, michael@0: { 0x00, 0x34, 0x34 }, michael@0: { 0x00, 0x35, 0x35 }, michael@0: { 0x00, 0x36, 0x36 }, michael@0: { 0x00, 0x37, 0x37 }, michael@0: { 0x00, 0x38, 0x38 }, michael@0: { 0x00, 0x39, 0x39 }, michael@0: { 0x00, 0x3a, 0x3a }, michael@0: { 0x00, 0x3b, 0x3b }, michael@0: { 0x00, 0x3c, 0x3c }, michael@0: { 0x00, 0x3d, 0x3d }, michael@0: { 0x00, 0x3e, 0x3e }, michael@0: { 0x00, 0x3f, 0x3f }, michael@0: { 0x00, 0x40, 0x40 }, michael@0: { 0x01, 0x61, 0x41 }, michael@0: { 0x01, 0x62, 0x42 }, michael@0: { 0x01, 0x63, 0x43 }, michael@0: { 0x01, 0x64, 0x44 }, michael@0: { 0x01, 0x65, 0x45 }, michael@0: { 0x01, 0x66, 0x46 }, michael@0: { 0x01, 0x67, 0x47 }, michael@0: { 0x01, 0x68, 0x48 }, michael@0: { 0x01, 0x69, 0x49 }, michael@0: { 0x01, 0x6a, 0x4a }, michael@0: { 0x01, 0x6b, 0x4b }, michael@0: { 0x01, 0x6c, 0x4c }, michael@0: { 0x01, 0x6d, 0x4d }, michael@0: { 0x01, 0x6e, 0x4e }, michael@0: { 0x01, 0x6f, 0x4f }, michael@0: { 0x01, 0x70, 0x50 }, michael@0: { 0x01, 0x71, 0x51 }, michael@0: { 0x01, 0x72, 0x52 }, michael@0: { 0x01, 0x73, 0x53 }, michael@0: { 0x01, 0x74, 0x54 }, michael@0: { 0x01, 0x75, 0x55 }, michael@0: { 0x01, 0x76, 0x56 }, michael@0: { 0x01, 0x77, 0x57 }, michael@0: { 0x01, 0x78, 0x58 }, michael@0: { 0x01, 0x79, 0x59 }, michael@0: { 0x01, 0x7a, 0x5a }, michael@0: { 0x00, 0x5b, 0x5b }, michael@0: { 0x00, 0x5c, 0x5c }, michael@0: { 0x00, 0x5d, 0x5d }, michael@0: { 0x00, 0x5e, 0x5e }, michael@0: { 0x00, 0x5f, 0x5f }, michael@0: { 0x00, 0x60, 0x60 }, michael@0: { 0x00, 0x61, 0x41 }, michael@0: { 0x00, 0x62, 0x42 }, michael@0: { 0x00, 0x63, 0x43 }, michael@0: { 0x00, 0x64, 0x44 }, michael@0: { 0x00, 0x65, 0x45 }, michael@0: { 0x00, 0x66, 0x46 }, michael@0: { 0x00, 0x67, 0x47 }, michael@0: { 0x00, 0x68, 0x48 }, michael@0: { 0x00, 0x69, 0x49 }, michael@0: { 0x00, 0x6a, 0x4a }, michael@0: { 0x00, 0x6b, 0x4b }, michael@0: { 0x00, 0x6c, 0x4c }, michael@0: { 0x00, 0x6d, 0x4d }, michael@0: { 0x00, 0x6e, 0x4e }, michael@0: { 0x00, 0x6f, 0x4f }, michael@0: { 0x00, 0x70, 0x50 }, michael@0: { 0x00, 0x71, 0x51 }, michael@0: { 0x00, 0x72, 0x52 }, michael@0: { 0x00, 0x73, 0x53 }, michael@0: { 0x00, 0x74, 0x54 }, michael@0: { 0x00, 0x75, 0x55 }, michael@0: { 0x00, 0x76, 0x56 }, michael@0: { 0x00, 0x77, 0x57 }, michael@0: { 0x00, 0x78, 0x58 }, michael@0: { 0x00, 0x79, 0x59 }, michael@0: { 0x00, 0x7a, 0x5a }, michael@0: { 0x00, 0x7b, 0x7b }, michael@0: { 0x00, 0x7c, 0x7c }, michael@0: { 0x00, 0x7d, 0x7d }, michael@0: { 0x00, 0x7e, 0x7e }, michael@0: { 0x00, 0x7f, 0x7f }, michael@0: { 0x00, 0x80, 0x80 }, michael@0: { 0x00, 0x81, 0x81 }, michael@0: { 0x00, 0x82, 0x82 }, michael@0: { 0x00, 0x83, 0x83 }, michael@0: { 0x00, 0x84, 0x84 }, michael@0: { 0x00, 0x85, 0x85 }, michael@0: { 0x00, 0x86, 0x86 }, michael@0: { 0x00, 0x87, 0x87 }, michael@0: { 0x00, 0x88, 0x88 }, michael@0: { 0x00, 0x89, 0x89 }, michael@0: { 0x00, 0x8a, 0x8a }, michael@0: { 0x00, 0x8b, 0x8b }, michael@0: { 0x00, 0x8c, 0x8c }, michael@0: { 0x00, 0x8d, 0x8d }, michael@0: { 0x00, 0x8e, 0x8e }, michael@0: { 0x00, 0x8f, 0x8f }, michael@0: { 0x00, 0x90, 0x90 }, michael@0: { 0x00, 0x91, 0x91 }, michael@0: { 0x00, 0x92, 0x92 }, michael@0: { 0x00, 0x93, 0x93 }, michael@0: { 0x00, 0x94, 0x94 }, michael@0: { 0x00, 0x95, 0x95 }, michael@0: { 0x00, 0x96, 0x96 }, michael@0: { 0x00, 0x97, 0x97 }, michael@0: { 0x00, 0x98, 0x98 }, michael@0: { 0x00, 0x99, 0x99 }, michael@0: { 0x00, 0x9a, 0x9a }, michael@0: { 0x00, 0x9b, 0x9b }, michael@0: { 0x00, 0x9c, 0x9c }, michael@0: { 0x00, 0x9d, 0x9d }, michael@0: { 0x00, 0x9e, 0x9e }, michael@0: { 0x00, 0x9f, 0x9f }, michael@0: { 0x00, 0xa0, 0xa0 }, michael@0: { 0x00, 0xa1, 0xa1 }, michael@0: { 0x00, 0xa2, 0xa2 }, michael@0: { 0x00, 0xa3, 0xa3 }, michael@0: { 0x00, 0xa4, 0xa4 }, michael@0: { 0x00, 0xa5, 0xa5 }, michael@0: { 0x00, 0xa6, 0xa6 }, michael@0: { 0x00, 0xa7, 0xa7 }, michael@0: { 0x00, 0xa8, 0xa8 }, michael@0: { 0x00, 0xa9, 0xa9 }, michael@0: { 0x00, 0xaa, 0xaa }, michael@0: { 0x00, 0xab, 0xab }, michael@0: { 0x00, 0xac, 0xac }, michael@0: { 0x00, 0xad, 0xad }, michael@0: { 0x00, 0xae, 0xae }, michael@0: { 0x00, 0xaf, 0xaf }, michael@0: { 0x00, 0xb0, 0xb0 }, michael@0: { 0x00, 0xb1, 0xb1 }, michael@0: { 0x00, 0xb2, 0xb2 }, michael@0: { 0x00, 0xb3, 0xb3 }, michael@0: { 0x00, 0xb4, 0xb4 }, michael@0: { 0x00, 0xb5, 0xb5 }, michael@0: { 0x00, 0xb6, 0xb6 }, michael@0: { 0x00, 0xb7, 0xb7 }, michael@0: { 0x00, 0xb8, 0xb8 }, michael@0: { 0x00, 0xb9, 0xb9 }, michael@0: { 0x00, 0xba, 0xba }, michael@0: { 0x00, 0xbb, 0xbb }, michael@0: { 0x00, 0xbc, 0xbc }, michael@0: { 0x00, 0xbd, 0xbd }, michael@0: { 0x00, 0xbe, 0xbe }, michael@0: { 0x00, 0xbf, 0xbf }, michael@0: { 0x00, 0xc0, 0xc0 }, michael@0: { 0x00, 0xc1, 0xc1 }, michael@0: { 0x00, 0xc2, 0xc2 }, michael@0: { 0x00, 0xc3, 0xc3 }, michael@0: { 0x00, 0xc4, 0xc4 }, michael@0: { 0x00, 0xc5, 0xc5 }, michael@0: { 0x00, 0xc6, 0xc6 }, michael@0: { 0x00, 0xc7, 0xc7 }, michael@0: { 0x00, 0xc8, 0xc8 }, michael@0: { 0x00, 0xc9, 0xc9 }, michael@0: { 0x00, 0xca, 0xca }, michael@0: { 0x00, 0xcb, 0xcb }, michael@0: { 0x00, 0xcc, 0xcc }, michael@0: { 0x00, 0xcd, 0xcd }, michael@0: { 0x00, 0xce, 0xce }, michael@0: { 0x00, 0xcf, 0xcf }, michael@0: { 0x00, 0xd0, 0xd0 }, michael@0: { 0x00, 0xd1, 0xd1 }, michael@0: { 0x00, 0xd2, 0xd2 }, michael@0: { 0x00, 0xd3, 0xd3 }, michael@0: { 0x00, 0xd4, 0xd4 }, michael@0: { 0x00, 0xd5, 0xd5 }, michael@0: { 0x00, 0xd6, 0xd6 }, michael@0: { 0x00, 0xd7, 0xd7 }, michael@0: { 0x00, 0xd8, 0xd8 }, michael@0: { 0x00, 0xd9, 0xd9 }, michael@0: { 0x00, 0xda, 0xda }, michael@0: { 0x00, 0xdb, 0xdb }, michael@0: { 0x00, 0xdc, 0xdc }, michael@0: { 0x00, 0xdd, 0xdd }, michael@0: { 0x00, 0xde, 0xde }, michael@0: { 0x00, 0xdf, 0xdf }, michael@0: { 0x00, 0xe0, 0xe0 }, michael@0: { 0x00, 0xe1, 0xe1 }, michael@0: { 0x00, 0xe2, 0xe2 }, michael@0: { 0x00, 0xe3, 0xe3 }, michael@0: { 0x00, 0xe4, 0xe4 }, michael@0: { 0x00, 0xe5, 0xe5 }, michael@0: { 0x00, 0xe6, 0xe6 }, michael@0: { 0x00, 0xe7, 0xe7 }, michael@0: { 0x00, 0xe8, 0xe8 }, michael@0: { 0x00, 0xe9, 0xe9 }, michael@0: { 0x00, 0xea, 0xea }, michael@0: { 0x00, 0xeb, 0xeb }, michael@0: { 0x00, 0xec, 0xec }, michael@0: { 0x00, 0xed, 0xed }, michael@0: { 0x00, 0xee, 0xee }, michael@0: { 0x00, 0xef, 0xef }, michael@0: { 0x00, 0xf0, 0xf0 }, michael@0: { 0x00, 0xf1, 0xf1 }, michael@0: { 0x00, 0xf2, 0xf2 }, michael@0: { 0x00, 0xf3, 0xf3 }, michael@0: { 0x00, 0xf4, 0xf4 }, michael@0: { 0x00, 0xf5, 0xf5 }, michael@0: { 0x00, 0xf6, 0xf6 }, michael@0: { 0x00, 0xf7, 0xf7 }, michael@0: { 0x00, 0xf8, 0xf8 }, michael@0: { 0x00, 0xf9, 0xf9 }, michael@0: { 0x00, 0xfa, 0xfa }, michael@0: { 0x00, 0xfb, 0xfb }, michael@0: { 0x00, 0xfc, 0xfc }, michael@0: { 0x00, 0xfd, 0xfd }, michael@0: { 0x00, 0xfe, 0xfe }, michael@0: { 0x00, 0xff, 0xff } michael@0: }; michael@0: michael@0: struct enc_entry { michael@0: const char * enc_name; michael@0: struct cs_info * cs_table; michael@0: }; michael@0: michael@0: static struct enc_entry encds[] = { michael@0: {"iso88591",iso1_tbl}, //ISO-8859-1 michael@0: {"iso88592",iso2_tbl}, //ISO-8859-2 michael@0: {"iso88593",iso3_tbl}, //ISO-8859-3 michael@0: {"iso88594",iso4_tbl}, //ISO-8859-4 michael@0: {"iso88595",iso5_tbl}, //ISO-8859-5 michael@0: {"iso88596",iso6_tbl}, //ISO-8859-6 michael@0: {"iso88597",iso7_tbl}, //ISO-8859-7 michael@0: {"iso88598",iso8_tbl}, //ISO-8859-8 michael@0: {"iso88599",iso9_tbl}, //ISO-8859-9 michael@0: {"iso885910",iso10_tbl}, //ISO-8859-10 michael@0: {"tis620",tis620_tbl}, //TIS-620/ISO-8859-11 michael@0: {"tis6202533",tis620_tbl}, //TIS-620/ISO-8859-11 michael@0: {"iso885911",tis620_tbl}, //TIS-620/ISO-8859-11 michael@0: {"iso885913", iso13_tbl}, //ISO-8859-13 michael@0: {"iso885914", iso14_tbl}, //ISO-8859-14 michael@0: {"iso885915", iso15_tbl}, //ISO-8859-15 michael@0: {"koi8r",koi8r_tbl}, //KOI8-R michael@0: {"koi8u",koi8u_tbl}, //KOI8-U michael@0: {"cp1251",cp1251_tbl}, //CP-1251 michael@0: {"microsoftcp1251",cp1251_tbl}, //microsoft-cp1251 michael@0: {"xisciias", iscii_devanagari_tbl}, //x-iscii-as michael@0: {"isciidevanagari", iscii_devanagari_tbl} //ISCII-DEVANAGARI michael@0: }; michael@0: michael@0: /* map to lower case and remove non alphanumeric chars */ michael@0: static void toAsciiLowerAndRemoveNonAlphanumeric( const char* pName, char* pBuf ) michael@0: { michael@0: while ( *pName ) michael@0: { michael@0: /* A-Z */ michael@0: if ( (*pName >= 0x41) && (*pName <= 0x5A) ) michael@0: { michael@0: *pBuf = (*pName)+0x20; /* toAsciiLower */ michael@0: pBuf++; michael@0: } michael@0: /* a-z, 0-9 */ michael@0: else if ( ((*pName >= 0x61) && (*pName <= 0x7A)) || michael@0: ((*pName >= 0x30) && (*pName <= 0x39)) ) michael@0: { michael@0: *pBuf = *pName; michael@0: pBuf++; michael@0: } michael@0: michael@0: pName++; michael@0: } michael@0: michael@0: *pBuf = '\0'; michael@0: } michael@0: michael@0: struct cs_info * get_current_cs(const char * es) { michael@0: char *normalized_encoding = new char[strlen(es)+1]; michael@0: toAsciiLowerAndRemoveNonAlphanumeric(es, normalized_encoding); michael@0: michael@0: struct cs_info * ccs = NULL; michael@0: int n = sizeof(encds) / sizeof(encds[0]); michael@0: for (int i = 0; i < n; i++) { michael@0: if (strcmp(normalized_encoding,encds[i].enc_name) == 0) { michael@0: ccs = encds[i].cs_table; michael@0: break; michael@0: } michael@0: } michael@0: michael@0: delete[] normalized_encoding; michael@0: michael@0: if (!ccs) { michael@0: HUNSPELL_WARNING(stderr, "error: unknown encoding %s: using %s as fallback\n", es, encds[0].enc_name); michael@0: ccs = encds[0].cs_table; michael@0: } michael@0: michael@0: return ccs; michael@0: } michael@0: #else michael@0: // XXX This function was rewritten for mozilla. Instead of storing the michael@0: // conversion tables static in this file, create them when needed michael@0: // with help the mozilla backend. michael@0: struct cs_info * get_current_cs(const char * es) { michael@0: struct cs_info *ccs = new cs_info[256]; michael@0: // Initialze the array with dummy data so that we wouldn't need michael@0: // to return null in case of failures. michael@0: for (int i = 0; i <= 0xff; ++i) { michael@0: ccs[i].ccase = false; michael@0: ccs[i].clower = i; michael@0: ccs[i].cupper = i; michael@0: } michael@0: michael@0: nsCOMPtr encoder; michael@0: nsCOMPtr decoder; michael@0: michael@0: nsresult rv; michael@0: nsCOMPtr ccm = do_GetService(kCharsetConverterManagerCID, &rv); michael@0: if (NS_FAILED(rv)) michael@0: return ccs; michael@0: michael@0: rv = ccm->GetUnicodeEncoder(es, getter_AddRefs(encoder)); michael@0: if (NS_FAILED(rv)) michael@0: return ccs; michael@0: encoder->SetOutputErrorBehavior(encoder->kOnError_Signal, nullptr, '?'); michael@0: rv = ccm->GetUnicodeDecoder(es, getter_AddRefs(decoder)); michael@0: if (NS_FAILED(rv)) michael@0: return ccs; michael@0: decoder->SetInputErrorBehavior(decoder->kOnError_Signal); michael@0: michael@0: if (NS_FAILED(rv)) michael@0: return ccs; michael@0: michael@0: for (unsigned int i = 0; i <= 0xff; ++i) { michael@0: bool success = false; michael@0: // We want to find the upper/lowercase equivalents of each byte michael@0: // in this 1-byte character encoding. Call our encoding/decoding michael@0: // APIs separately for each byte since they may reject some of the michael@0: // bytes, and we want to handle errors separately for each byte. michael@0: char lower, upper; michael@0: do { michael@0: if (i == 0) michael@0: break; michael@0: const char source = char(i); michael@0: char16_t uni, uniCased; michael@0: int32_t charLength = 1, uniLength = 1; michael@0: michael@0: rv = decoder->Convert(&source, &charLength, &uni, &uniLength); michael@0: // Explicitly check NS_OK because we don't want to allow michael@0: // NS_OK_UDEC_MOREOUTPUT or NS_OK_UDEC_MOREINPUT. michael@0: if (rv != NS_OK || charLength != 1 || uniLength != 1) michael@0: break; michael@0: uniCased = ToLowerCase(uni); michael@0: rv = encoder->Convert(&uniCased, &uniLength, &lower, &charLength); michael@0: // Explicitly check NS_OK because we don't want to allow michael@0: // NS_OK_UDEC_MOREOUTPUT or NS_OK_UDEC_MOREINPUT. michael@0: if (rv != NS_OK || charLength != 1 || uniLength != 1) michael@0: break; michael@0: michael@0: uniCased = ToUpperCase(uni); michael@0: rv = encoder->Convert(&uniCased, &uniLength, &upper, &charLength); michael@0: // Explicitly check NS_OK because we don't want to allow michael@0: // NS_OK_UDEC_MOREOUTPUT or NS_OK_UDEC_MOREINPUT. michael@0: if (rv != NS_OK || charLength != 1 || uniLength != 1) michael@0: break; michael@0: michael@0: success = true; michael@0: } while (0); michael@0: michael@0: if (success) { michael@0: ccs[i].cupper = upper; michael@0: ccs[i].clower = lower; michael@0: } else { michael@0: ccs[i].cupper = i; michael@0: ccs[i].clower = i; michael@0: } michael@0: michael@0: if (ccs[i].clower != (unsigned char)i) michael@0: ccs[i].ccase = true; michael@0: else michael@0: ccs[i].ccase = false; michael@0: } michael@0: michael@0: return ccs; michael@0: } michael@0: #endif michael@0: michael@0: // primitive isalpha() replacement for tokenization michael@0: char * get_casechars(const char * enc) { michael@0: struct cs_info * csconv = get_current_cs(enc); michael@0: char expw[MAXLNLEN]; michael@0: char * p = expw; michael@0: for (int i = 0; i <= 255; i++) { michael@0: if ((csconv[i].cupper != csconv[i].clower)) { michael@0: *p = (char) i; michael@0: p++; michael@0: } michael@0: } michael@0: *p = '\0'; michael@0: #ifdef MOZILLA_CLIENT michael@0: delete [] csconv; michael@0: #endif michael@0: return mystrdup(expw); michael@0: } michael@0: michael@0: // language to encoding default map michael@0: michael@0: struct lang_map { michael@0: const char * lang; michael@0: int num; michael@0: }; michael@0: michael@0: static struct lang_map lang2enc[] = { michael@0: {"ar", LANG_ar}, michael@0: {"az", LANG_az}, michael@0: {"az_AZ", LANG_az}, // for back-compatibility michael@0: {"bg", LANG_bg}, michael@0: {"ca", LANG_ca}, michael@0: {"cs", LANG_cs}, michael@0: {"da", LANG_da}, michael@0: {"de", LANG_de}, michael@0: {"el", LANG_el}, michael@0: {"en", LANG_en}, michael@0: {"es", LANG_es}, michael@0: {"eu", LANG_eu}, michael@0: {"gl", LANG_gl}, michael@0: {"fr", LANG_fr}, michael@0: {"hr", LANG_hr}, michael@0: {"hu", LANG_hu}, michael@0: {"hu_HU", LANG_hu}, // for back-compatibility michael@0: {"it", LANG_it}, michael@0: {"la", LANG_la}, michael@0: {"lv", LANG_lv}, michael@0: {"nl", LANG_nl}, michael@0: {"pl", LANG_pl}, michael@0: {"pt", LANG_pt}, michael@0: {"sv", LANG_sv}, michael@0: {"tr", LANG_tr}, michael@0: {"tr_TR", LANG_tr}, // for back-compatibility michael@0: {"ru", LANG_ru}, michael@0: {"uk", LANG_uk} michael@0: }; michael@0: michael@0: michael@0: int get_lang_num(const char * lang) { michael@0: int n = sizeof(lang2enc) / sizeof(lang2enc[0]); michael@0: for (int i = 0; i < n; i++) { michael@0: if (strcmp(lang, lang2enc[i].lang) == 0) { michael@0: return lang2enc[i].num; michael@0: } michael@0: } michael@0: return LANG_xx; michael@0: } michael@0: michael@0: #ifndef OPENOFFICEORG michael@0: #ifndef MOZILLA_CLIENT michael@0: int initialize_utf_tbl() { michael@0: utf_tbl_count++; michael@0: if (utf_tbl) return 0; michael@0: utf_tbl = (unicode_info2 *) malloc(CONTSIZE * sizeof(unicode_info2)); michael@0: if (utf_tbl) { michael@0: size_t j; michael@0: for (j = 0; j < CONTSIZE; j++) { michael@0: utf_tbl[j].cletter = 0; michael@0: utf_tbl[j].clower = (unsigned short) j; michael@0: utf_tbl[j].cupper = (unsigned short) j; michael@0: } michael@0: for (j = 0; j < UTF_LST_LEN; j++) { michael@0: utf_tbl[utf_lst[j].c].cletter = 1; michael@0: utf_tbl[utf_lst[j].c].clower = utf_lst[j].clower; michael@0: utf_tbl[utf_lst[j].c].cupper = utf_lst[j].cupper; michael@0: } michael@0: } else return 1; michael@0: return 0; michael@0: } michael@0: #endif michael@0: #endif michael@0: michael@0: void free_utf_tbl() { michael@0: if (utf_tbl_count > 0) utf_tbl_count--; michael@0: if (utf_tbl && (utf_tbl_count == 0)) { michael@0: free(utf_tbl); michael@0: utf_tbl = NULL; michael@0: } michael@0: } michael@0: michael@0: unsigned short unicodetoupper(unsigned short c, int langnum) michael@0: { michael@0: // In Azeri and Turkish, I and i dictinct letters: michael@0: // There are a dotless lower case i pair of upper `I', michael@0: // and an upper I with dot pair of lower `i'. michael@0: if (c == 0x0069 && ((langnum == LANG_az) || (langnum == LANG_tr))) michael@0: return 0x0130; michael@0: #ifdef OPENOFFICEORG michael@0: return u_toupper(c); michael@0: #else michael@0: #ifdef MOZILLA_CLIENT michael@0: return ToUpperCase((char16_t) c); michael@0: #else michael@0: return (utf_tbl) ? utf_tbl[c].cupper : c; michael@0: #endif michael@0: #endif michael@0: } michael@0: michael@0: unsigned short unicodetolower(unsigned short c, int langnum) michael@0: { michael@0: // In Azeri and Turkish, I and i dictinct letters: michael@0: // There are a dotless lower case i pair of upper `I', michael@0: // and an upper I with dot pair of lower `i'. michael@0: if (c == 0x0049 && ((langnum == LANG_az) || (langnum == LANG_tr))) michael@0: return 0x0131; michael@0: #ifdef OPENOFFICEORG michael@0: return u_tolower(c); michael@0: #else michael@0: #ifdef MOZILLA_CLIENT michael@0: return ToLowerCase((char16_t) c); michael@0: #else michael@0: return (utf_tbl) ? utf_tbl[c].clower : c; michael@0: #endif michael@0: #endif michael@0: } michael@0: michael@0: int unicodeisalpha(unsigned short c) michael@0: { michael@0: #ifdef OPENOFFICEORG michael@0: return u_isalpha(c); michael@0: #else michael@0: return (utf_tbl) ? utf_tbl[c].cletter : 0; michael@0: #endif michael@0: } michael@0: michael@0: /* get type of capitalization */ michael@0: int get_captype(char * word, int nl, cs_info * csconv) { michael@0: // now determine the capitalization type of the first nl letters michael@0: int ncap = 0; michael@0: int nneutral = 0; michael@0: int firstcap = 0; michael@0: if (csconv == NULL) return NOCAP; michael@0: for (char * q = word; *q != '\0'; q++) { michael@0: if (csconv[*((unsigned char *)q)].ccase) ncap++; michael@0: if (csconv[*((unsigned char *)q)].cupper == csconv[*((unsigned char *)q)].clower) nneutral++; michael@0: } michael@0: if (ncap) { michael@0: firstcap = csconv[*((unsigned char *) word)].ccase; michael@0: } michael@0: michael@0: // now finally set the captype michael@0: if (ncap == 0) { michael@0: return NOCAP; michael@0: } else if ((ncap == 1) && firstcap) { michael@0: return INITCAP; michael@0: } else if ((ncap == nl) || ((ncap + nneutral) == nl)) { michael@0: return ALLCAP; michael@0: } else if ((ncap > 1) && firstcap) { michael@0: return HUHINITCAP; michael@0: } michael@0: return HUHCAP; michael@0: } michael@0: michael@0: int get_captype_utf8(w_char * word, int nl, int langnum) { michael@0: // now determine the capitalization type of the first nl letters michael@0: int ncap = 0; michael@0: int nneutral = 0; michael@0: int firstcap = 0; michael@0: unsigned short idx; michael@0: // don't check too long words michael@0: if (nl >= MAXWORDLEN) return 0; michael@0: // big Unicode character (non BMP area) michael@0: if (nl == -1) return NOCAP; michael@0: for (int i = 0; i < nl; i++) { michael@0: idx = (word[i].h << 8) + word[i].l; michael@0: if (idx != unicodetolower(idx, langnum)) ncap++; michael@0: if (unicodetoupper(idx, langnum) == unicodetolower(idx, langnum)) nneutral++; michael@0: } michael@0: if (ncap) { michael@0: idx = (word[0].h << 8) + word[0].l; michael@0: firstcap = (idx != unicodetolower(idx, langnum)); michael@0: } michael@0: michael@0: // now finally set the captype michael@0: if (ncap == 0) { michael@0: return NOCAP; michael@0: } else if ((ncap == 1) && firstcap) { michael@0: return INITCAP; michael@0: } else if ((ncap == nl) || ((ncap + nneutral) == nl)) { michael@0: return ALLCAP; michael@0: } else if ((ncap > 1) && firstcap) { michael@0: return HUHINITCAP; michael@0: } michael@0: return HUHCAP; michael@0: } michael@0: michael@0: michael@0: // strip all ignored characters in the string michael@0: void remove_ignored_chars_utf(char * word, unsigned short ignored_chars[], int ignored_len) michael@0: { michael@0: w_char w[MAXWORDLEN]; michael@0: w_char w2[MAXWORDLEN]; michael@0: int i; michael@0: int j; michael@0: int len = u8_u16(w, MAXWORDLEN, word); michael@0: for (i = 0, j = 0; i < len; i++) { michael@0: if (!flag_bsearch(ignored_chars, ((unsigned short *) w)[i], ignored_len)) { michael@0: w2[j] = w[i]; michael@0: j++; michael@0: } michael@0: } michael@0: if (j < i) u16_u8(word, MAXWORDUTF8LEN, w2, j); michael@0: } michael@0: michael@0: // strip all ignored characters in the string michael@0: void remove_ignored_chars(char * word, char * ignored_chars) michael@0: { michael@0: for (char * p = word; *p != '\0'; p++) { michael@0: if (!strchr(ignored_chars, *p)) { michael@0: *word = *p; michael@0: word++; michael@0: } michael@0: } michael@0: *word = '\0'; michael@0: } michael@0: michael@0: int parse_string(char * line, char ** out, int ln) michael@0: { michael@0: char * tp = line; michael@0: char * piece; michael@0: int i = 0; michael@0: int np = 0; michael@0: if (*out) { michael@0: HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions\n", ln); michael@0: return 1; michael@0: } michael@0: piece = mystrsep(&tp, 0); michael@0: while (piece) { michael@0: if (*piece != '\0') { michael@0: switch(i) { michael@0: case 0: { np++; break; } michael@0: case 1: { michael@0: *out = mystrdup(piece); michael@0: if (!*out) return 1; michael@0: np++; michael@0: break; michael@0: } michael@0: default: break; michael@0: } michael@0: i++; michael@0: } michael@0: // free(piece); michael@0: piece = mystrsep(&tp, 0); michael@0: } michael@0: if (np != 2) { michael@0: HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", ln); michael@0: return 1; michael@0: } michael@0: return 0; michael@0: } michael@0: michael@0: int parse_array(char * line, char ** out, unsigned short ** out_utf16, michael@0: int * out_utf16_len, int utf8, int ln) { michael@0: if (parse_string(line, out, ln)) return 1; michael@0: if (utf8) { michael@0: w_char w[MAXWORDLEN]; michael@0: int n = u8_u16(w, MAXWORDLEN, *out); michael@0: if (n > 0) { michael@0: flag_qsort((unsigned short *) w, 0, n); michael@0: *out_utf16 = (unsigned short *) malloc(n * sizeof(unsigned short)); michael@0: if (!*out_utf16) return 1; michael@0: memcpy(*out_utf16, w, n * sizeof(unsigned short)); michael@0: } michael@0: *out_utf16_len = n; michael@0: } michael@0: return 0; michael@0: }