(MAKE_CHAR): Check the result for range-represented charset.
[chise/xemacs-chise.git] / src / mule-charset.c
index d9b39b8..6177211 100644 (file)
@@ -19,7 +19,7 @@ along with XEmacs; see the file COPYING.  If not, write to
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* Synched up with: Mule 2.3.  Not in FSF. */
+/* Synched up with: FSF 20.3.  Not in FSF. */
 
 /* Rewritten by Ben Wing <ben@xemacs.org>. */
 
 
 /* Rewritten by Ben Wing <ben@xemacs.org>. */
 
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA.  */
 #include "lstream.h"
 #include "device.h"
 #include "faces.h"
 #include "lstream.h"
 #include "device.h"
 #include "faces.h"
+#include "mule-ccl.h"
 
 /* The various pre-defined charsets. */
 
 
 /* The various pre-defined charsets. */
 
@@ -41,40 +42,56 @@ Lisp_Object Vcharset_latin_iso8859_1;
 Lisp_Object Vcharset_latin_iso8859_2;
 Lisp_Object Vcharset_latin_iso8859_3;
 Lisp_Object Vcharset_latin_iso8859_4;
 Lisp_Object Vcharset_latin_iso8859_2;
 Lisp_Object Vcharset_latin_iso8859_3;
 Lisp_Object Vcharset_latin_iso8859_4;
-Lisp_Object Vcharset_cyrillic_iso8859_5;
-Lisp_Object Vcharset_arabic_iso8859_6;
+Lisp_Object Vcharset_thai_tis620;
 Lisp_Object Vcharset_greek_iso8859_7;
 Lisp_Object Vcharset_greek_iso8859_7;
+Lisp_Object Vcharset_arabic_iso8859_6;
 Lisp_Object Vcharset_hebrew_iso8859_8;
 Lisp_Object Vcharset_hebrew_iso8859_8;
-Lisp_Object Vcharset_latin_iso8859_9;
-Lisp_Object Vcharset_thai_tis620;
 Lisp_Object Vcharset_katakana_jisx0201;
 Lisp_Object Vcharset_latin_jisx0201;
 Lisp_Object Vcharset_katakana_jisx0201;
 Lisp_Object Vcharset_latin_jisx0201;
+Lisp_Object Vcharset_cyrillic_iso8859_5;
+Lisp_Object Vcharset_latin_iso8859_9;
 Lisp_Object Vcharset_japanese_jisx0208_1978;
 Lisp_Object Vcharset_japanese_jisx0208_1978;
+Lisp_Object Vcharset_chinese_gb2312;
 Lisp_Object Vcharset_japanese_jisx0208;
 Lisp_Object Vcharset_japanese_jisx0208;
+Lisp_Object Vcharset_korean_ksc5601;
 Lisp_Object Vcharset_japanese_jisx0212;
 Lisp_Object Vcharset_japanese_jisx0212;
-Lisp_Object Vcharset_chinese_gb2312;
-Lisp_Object Vcharset_chinese_big5_1;
-Lisp_Object Vcharset_chinese_big5_2;
 Lisp_Object Vcharset_chinese_cns11643_1;
 Lisp_Object Vcharset_chinese_cns11643_2;
 Lisp_Object Vcharset_chinese_cns11643_1;
 Lisp_Object Vcharset_chinese_cns11643_2;
-Lisp_Object Vcharset_korean_ksc5601;
+#ifdef UTF2000
+Lisp_Object Vcharset_ucs_bmp;
+Lisp_Object Vcharset_latin_viscii_lower;
+Lisp_Object Vcharset_latin_viscii_upper;
+Lisp_Object Vcharset_hiragana_jisx0208;
+Lisp_Object Vcharset_katakana_jisx0208;
+#endif
+Lisp_Object Vcharset_chinese_big5_1;
+Lisp_Object Vcharset_chinese_big5_2;
+
+#ifdef ENABLE_COMPOSITE_CHARS
 Lisp_Object Vcharset_composite;
 
 Lisp_Object Vcharset_composite;
 
-/* Hashtables for composite chars.  One maps string representing
+/* Hash tables for composite chars.  One maps string representing
    composed chars to their equivalent chars; one goes the
    other way. */
    composed chars to their equivalent chars; one goes the
    other way. */
-Lisp_Object Vcomposite_char_char2string_hashtable;
-Lisp_Object Vcomposite_char_string2char_hashtable;
+Lisp_Object Vcomposite_char_char2string_hash_table;
+Lisp_Object Vcomposite_char_string2char_hash_table;
+
+static int composite_char_row_next;
+static int composite_char_col_next;
+
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 /* Table of charsets indexed by leading byte. */
 
 /* Table of charsets indexed by leading byte. */
-Lisp_Object charset_by_leading_byte[128];
+Lisp_Object charset_by_leading_byte[NUM_LEADING_BYTES];
 
 /* Table of charsets indexed by type/final-byte/direction. */
 
 /* Table of charsets indexed by type/final-byte/direction. */
+#ifdef UTF2000
+Lisp_Object charset_by_attributes[4][128];
+#else
 Lisp_Object charset_by_attributes[4][128][2];
 Lisp_Object charset_by_attributes[4][128][2];
+#endif
 
 
-static int composite_char_row_next;
-static int composite_char_col_next;
-
+#ifndef UTF2000
 /* Table of number of bytes in the string representation of a character
    indexed by the first byte of that representation.
 
 /* Table of number of bytes in the string representation of a character
    indexed by the first byte of that representation.
 
@@ -94,12 +111,204 @@ Bytecount rep_bytes_by_first_byte[0xA0] =
   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
   /* 0x80 - 0x8f are for Dimension-1 official charsets */
   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
   1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
   /* 0x80 - 0x8f are for Dimension-1 official charsets */
+#ifdef CHAR_IS_UCS4
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3,
+#else
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
   2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+#endif
   /* 0x90 - 0x9d are for Dimension-2 official charsets */
   /* 0x9e is for Dimension-1 private charsets */
   /* 0x9f is for Dimension-2 private charsets */
   3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4
 };
   /* 0x90 - 0x9d are for Dimension-2 official charsets */
   /* 0x9e is for Dimension-1 private charsets */
   /* 0x9f is for Dimension-2 private charsets */
   3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4
 };
+#endif
+
+#ifdef UTF2000
+Emchar_to_byte_table*
+make_byte_from_character_table ()
+{
+  Emchar_to_byte_table* table
+    = (Emchar_to_byte_table*) xmalloc (sizeof (Emchar_to_byte_table));
+
+  table->base = NULL;
+  return table;
+}
+
+void
+put_byte_from_character_table (Emchar ch, unsigned char val,
+                              Emchar_to_byte_table* table)
+{
+  if (table->base == NULL)
+    {
+      table->base = xmalloc (128);
+      table->offset = ch - (ch % 128);
+      table->size = 128;
+      table->base[ch - table->offset] = val;
+    }
+  else
+    {
+      int i = ch - table->offset;
+
+      if (i < 0)
+       {
+         size_t new_size = table->size - i;
+         size_t j;
+
+         new_size += 128 - (new_size % 128);
+         table->base = xrealloc (table->base, new_size);
+         memmove (table->base + (new_size - table->size), table->base,
+                  table->size);
+         for (j = 0; j < (new_size - table->size); j++)
+           table->base[j] = 0;
+         table->offset -= (new_size - table->size);
+         table->base[ch - table->offset] = val;
+         table->size = new_size;
+       }
+      else if (i >= table->size)
+       {
+         size_t new_size = i + 1;
+         size_t j;
+
+         new_size += 128 - (new_size % 128);
+         table->base = xrealloc (table->base, new_size);
+         for (j = table->size; j < new_size; j++)
+           table->base[j] = 0;
+         table->base[i] = val;
+         table->size = new_size;
+       }
+      else
+       {
+         table->base[i] = val;
+       }
+    }
+}
+
+unsigned char
+get_byte_from_character_table (Emchar ch, Emchar_to_byte_table* table)
+{
+  size_t i = ch - table->offset;
+  if (i < table->size)
+    return table->base[i];
+  else
+    return 0;
+}
+
+Lisp_Object latin_jisx0201_to_ucs;
+Lisp_Object latin_iso8859_2_to_ucs;
+Lisp_Object latin_iso8859_3_to_ucs;
+Lisp_Object latin_iso8859_4_to_ucs;
+Lisp_Object latin_iso8859_9_to_ucs;
+Lisp_Object latin_viscii_lower_to_ucs;
+Lisp_Object latin_viscii_upper_to_ucs;
+
+#if 0
+Emchar latin_tcvn5712_to_ucs[96] =
+{
+  0x00A0 /* 0xA0  NO-BREAK SPACE */,
+  0x0102 /* 0xA1  LATIN CAPITAL LETTER A WITH BREVE */,
+  0x00C2 /* 0xA2  LATIN CAPITAL LETTER A WITH CIRCUMFLEX */,
+  0x00CA /* 0xA3  LATIN CAPITAL LETTER E WITH CIRCUMFLEX */,
+  0x00D4 /* 0xA4  LATIN CAPITAL LETTER O WITH CIRCUMFLEX */,
+  0x01A0 /* 0xA5  LATIN CAPITAL LETTER O WITH HORN */,
+  0x01AF /* 0xA6  LATIN CAPITAL LETTER U WITH HORN */,
+  0x0110 /* 0xA7  LATIN CAPITAL LETTER D WITH STROKE */,
+  0x0103 /* 0xA8  LATIN SMALL LETTER A WITH BREVE */,
+  0x00E2 /* 0xA9  LATIN SMALL LETTER A WITH CIRCUMFLEX */,
+  0x00EA /* 0xAA  LATIN SMALL LETTER E WITH CIRCUMFLEX */,
+  0x00F4 /* 0xAB  LATIN SMALL LETTER O WITH CIRCUMFLEX */,
+  0x01A1 /* 0xAC  LATIN SMALL LETTER O WITH HORN */,
+  0x01B0 /* 0xAD  LATIN SMALL LETTER U WITH HORN */,
+  0x0111 /* 0xAE  LATIN SMALL LETTER D WITH STROKE */,
+  0x1EB0 /* 0xAF  LATIN CAPITAL LETTER A WITH BREVE AND GRAVE */,
+  0x0300 /* 0xB0  COMBINING GRAVE ACCENT */,
+  0x0309 /* 0xB1  COMBINING HOOK ABOVE */,
+  0x0303 /* 0xB2  COMBINING TILDE */,
+  0x0301 /* 0xB3  COMBINING ACUTE ACCENT */,
+  0x0323 /* 0xB4  COMBINING DOT BELOW */,
+  0x00E0 /* 0xB5  LATIN SMALL LETTER A WITH GRAVE */,
+  0x1EA3 /* 0xB6  LATIN SMALL LETTER A WITH HOOK ABOVE */,
+  0x00E3 /* 0xB7  LATIN SMALL LETTER A WITH TILDE */,
+  0x00E1 /* 0xB8  LATIN SMALL LETTER A WITH ACUTE */,
+  0x1EA1 /* 0xB9  LATIN SMALL LETTER A WITH DOT BELOW */,
+  0x1EB2 /* 0xBA  LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE */,
+  0x1EB1 /* 0xBB  LATIN SMALL LETTER A WITH BREVE AND GRAVE */,
+  0x1EB3 /* 0xBC  LATIN SMALL LETTER A WITH BREVE AND HOOK ABOVE */,
+  0x1EB5 /* 0xBD  LATIN SMALL LETTER A WITH BREVE AND TILDE */,
+  0x1EAF /* 0xBE  LATIN SMALL LETTER A WITH BREVE AND ACUTE */,
+  0x1EB4 /* 0xBF  LATIN CAPITAL LETTER A WITH BREVE AND TILDE */,
+  0x1EAE /* 0xC0  LATIN CAPITAL LETTER A WITH BREVE AND ACUTE */,
+  0x1EA6 /* 0xC1  LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE */,
+  0x1EA8 /* 0xC2  LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */,
+  0x1EAA /* 0xC3  LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE */,
+  0x1EA4 /* 0xC4  LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE */,
+  0x1EC0 /* 0xC5  LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE */,
+  0x1EB7 /* 0xC6  LATIN SMALL LETTER A WITH BREVE AND DOT BELOW */,
+  0x1EA7 /* 0xC7  LATIN SMALL LETTER A WITH CIRCUMFLEX AND GRAVE */,
+  0x1EA9 /* 0xC8  LATIN SMALL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE */,
+  0x1EAB /* 0xC9  LATIN SMALL LETTER A WITH CIRCUMFLEX AND TILDE */,
+  0x1EA5 /* 0xCA  LATIN SMALL LETTER A WITH CIRCUMFLEX AND ACUTE */,
+  0x1EAD /* 0xCB  LATIN SMALL LETTER A WITH CIRCUMFLEX AND DOT BELOW */,
+  0x00E8 /* 0xCC  LATIN SMALL LETTER E WITH GRAVE */,
+  0x1EC2 /* 0xCD  LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */,
+  0x1EBB /* 0xCE  LATIN SMALL LETTER E WITH HOOK ABOVE */,
+  0x1EBD /* 0xCF  LATIN SMALL LETTER E WITH TILDE */,
+  0x00E9 /* 0xD0  LATIN SMALL LETTER E WITH ACUTE */,
+  0x1EB9 /* 0xD1  LATIN SMALL LETTER E WITH DOT BELOW */,
+  0x1EC1 /* 0xD2  LATIN SMALL LETTER E WITH CIRCUMFLEX AND GRAVE */,
+  0x1EC3 /* 0xD3  LATIN SMALL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE */,
+  0x1EC5 /* 0xD4  LATIN SMALL LETTER E WITH CIRCUMFLEX AND TILDE */,
+  0x1EBF /* 0xD5  LATIN SMALL LETTER E WITH CIRCUMFLEX AND ACUTE */,
+  0x1EC7 /* 0xD6  LATIN SMALL LETTER E WITH CIRCUMFLEX AND DOT BELOW */,
+  0x00EC /* 0xD7  LATIN SMALL LETTER I WITH GRAVE */,
+  0x1EC9 /* 0xD8  LATIN SMALL LETTER I WITH HOOK ABOVE */,
+  0x1EC4 /* 0xD9  LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE */,
+  0x1EBE /* 0xDA  LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE */,
+  0x1ED2 /* 0xDB  LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE */,
+  0x0129 /* 0xDC  LATIN SMALL LETTER I WITH TILDE */,
+  0x00ED /* 0xDD  LATIN SMALL LETTER I WITH ACUTE */,
+  0x1ECB /* 0xDE  LATIN SMALL LETTER I WITH DOT BELOW */,
+  0x00F2 /* 0xDF  LATIN SMALL LETTER O WITH GRAVE */,
+  0x1ED4 /* 0xE0  LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */,
+  0x1ECF /* 0xE1  LATIN SMALL LETTER O WITH HOOK ABOVE */,
+  0x00F5 /* 0xE2  LATIN SMALL LETTER O WITH TILDE */,
+  0x00F3 /* 0xE3  LATIN SMALL LETTER O WITH ACUTE */,
+  0x1ECD /* 0xE4  LATIN SMALL LETTER O WITH DOT BELOW */,
+  0x1ED3 /* 0xE5  LATIN SMALL LETTER O WITH CIRCUMFLEX AND GRAVE */,
+  0x1ED5 /* 0xE6  LATIN SMALL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE */,
+  0x1ED7 /* 0xE7  LATIN SMALL LETTER O WITH CIRCUMFLEX AND TILDE */,
+  0x1ED1 /* 0xE8  LATIN SMALL LETTER O WITH CIRCUMFLEX AND ACUTE */,
+  0x1ED9 /* 0xE9  LATIN SMALL LETTER O WITH CIRCUMFLEX AND DOT BELOW */,
+  0x1EDD /* 0xEA  LATIN SMALL LETTER O WITH HORN AND GRAVE */,
+  0x1EDF /* 0xEB  LATIN SMALL LETTER O WITH HORN AND HOOK ABOVE */,
+  0x1EE1 /* 0xEC  LATIN SMALL LETTER O WITH HORN AND TILDE */,
+  0x1EDB /* 0xED  LATIN SMALL LETTER O WITH HORN AND ACUTE */,
+  0x1EE3 /* 0xEE  LATIN SMALL LETTER O WITH HORN AND DOT BELOW */,
+  0x00F9 /* 0xEF  LATIN SMALL LETTER U WITH GRAVE */,
+  0x1ED6 /* 0xF0  LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE */,
+  0x1EE7 /* 0xF1  LATIN SMALL LETTER U WITH HOOK ABOVE */,
+  0x0169 /* 0xF2  LATIN SMALL LETTER U WITH TILDE */,
+  0x00FA /* 0xF3  LATIN SMALL LETTER U WITH ACUTE */,
+  0x1EE5 /* 0xF4  LATIN SMALL LETTER U WITH DOT BELOW */,
+  0x1EEB /* 0xF5  LATIN SMALL LETTER U WITH HORN AND GRAVE */,
+  0x1EED /* 0xF6  LATIN SMALL LETTER U WITH HORN AND HOOK ABOVE */,
+  0x1EEF /* 0xF7  LATIN SMALL LETTER U WITH HORN AND TILDE */,
+  0x1EE9 /* 0xF8  LATIN SMALL LETTER U WITH HORN AND ACUTE */,
+  0x1EF1 /* 0xF9  LATIN SMALL LETTER U WITH HORN AND DOT BELOW */,
+  0x1EF3 /* 0xFA  LATIN SMALL LETTER Y WITH GRAVE */,
+  0x1EF7 /* 0xFB  LATIN SMALL LETTER Y WITH HOOK ABOVE */,
+  0x1EF9 /* 0xFC  LATIN SMALL LETTER Y WITH TILDE */,
+  0x00FD /* 0xFD  LATIN SMALL LETTER Y WITH ACUTE */,
+  0x1EF5 /* 0xFE  LATIN SMALL LETTER Y WITH DOT BELOW */,
+  0x1ED0 /* 0xFF  LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE */
+};
+#endif
+
+Lisp_Object Vutf_2000_version;
+#endif
+
+#ifndef UTF2000
+int leading_code_private_11;
+#endif
 
 Lisp_Object Qcharsetp;
 
 
 Lisp_Object Qcharsetp;
 
@@ -107,39 +316,47 @@ Lisp_Object Qcharsetp;
 Lisp_Object Qregistry, Qfinal, Qgraphic;
 Lisp_Object Qdirection;
 Lisp_Object Qreverse_direction_charset;
 Lisp_Object Qregistry, Qfinal, Qgraphic;
 Lisp_Object Qdirection;
 Lisp_Object Qreverse_direction_charset;
-Lisp_Object Qccl_program;
-
-Lisp_Object Qascii, Qcontrol_1,
+Lisp_Object Qleading_byte;
+Lisp_Object Qshort_name, Qlong_name;
 
 
+Lisp_Object Qascii,
+  Qcontrol_1,
   Qlatin_iso8859_1,
   Qlatin_iso8859_2,
   Qlatin_iso8859_3,
   Qlatin_iso8859_4,
   Qlatin_iso8859_1,
   Qlatin_iso8859_2,
   Qlatin_iso8859_3,
   Qlatin_iso8859_4,
-  Qcyrillic_iso8859_5,
-  Qarabic_iso8859_6,
+  Qthai_tis620,
   Qgreek_iso8859_7,
   Qgreek_iso8859_7,
+  Qarabic_iso8859_6,
   Qhebrew_iso8859_8,
   Qhebrew_iso8859_8,
+  Qkatakana_jisx0201,
+  Qlatin_jisx0201,
+  Qcyrillic_iso8859_5,
   Qlatin_iso8859_9,
   Qlatin_iso8859_9,
-
-  Qthai_tis620,
-
-  Qkatakana_jisx0201, Qlatin_jisx0201,
   Qjapanese_jisx0208_1978,
   Qjapanese_jisx0208_1978,
+  Qchinese_gb2312,
   Qjapanese_jisx0208,
   Qjapanese_jisx0208,
+  Qkorean_ksc5601,
   Qjapanese_jisx0212,
   Qjapanese_jisx0212,
-
-  Qchinese_gb2312,
-  Qchinese_big5_1, Qchinese_big5_2,
-  Qchinese_cns11643_1, Qchinese_cns11643_2,
-
-  Qkorean_ksc5601, Qcomposite;
+  Qchinese_cns11643_1,
+  Qchinese_cns11643_2,
+#ifdef UTF2000
+  Qucs_bmp,
+  Qlatin_viscii_lower,
+  Qlatin_viscii_upper,
+  Qhiragana_jisx0208,
+  Qkatakana_jisx0208,
+#endif
+  Qchinese_big5_1,
+  Qchinese_big5_2,
+  Qcomposite;
 
 Lisp_Object Ql2r, Qr2l;
 
 
 Lisp_Object Ql2r, Qr2l;
 
-Lisp_Object Vcharset_hashtable;
+Lisp_Object Vcharset_hash_table;
 
 
-static Bufbyte next_allocated_1_byte_leading_byte;
-static Bufbyte next_allocated_2_byte_leading_byte;
+static Charset_ID next_allocated_1_byte_leading_byte;
+static Charset_ID next_allocated_2_byte_leading_byte;
 
 /* Composite characters are characters constructed by overstriking two
    or more regular characters.
 
 /* Composite characters are characters constructed by overstriking two
    or more regular characters.
@@ -184,11 +401,54 @@ Bytecount
 non_ascii_set_charptr_emchar (Bufbyte *str, Emchar c)
 {
   Bufbyte *p;
 non_ascii_set_charptr_emchar (Bufbyte *str, Emchar c)
 {
   Bufbyte *p;
-  Bufbyte lb;
+#ifndef UTF2000
+  Charset_ID lb;
   int c1, c2;
   Lisp_Object charset;
   int c1, c2;
   Lisp_Object charset;
+#endif
 
   p = str;
 
   p = str;
+#ifdef UTF2000
+  if ( c <= 0x7f )
+    {
+      *p++ = c;
+    }
+  else if ( c <= 0x7ff )
+    {
+      *p++ = (c >> 6) | 0xc0;
+      *p++ = (c & 0x3f) | 0x80;
+    }
+  else if ( c <= 0xffff )
+    {
+      *p++ =  (c >> 12) | 0xe0;
+      *p++ = ((c >>  6) & 0x3f) | 0x80;
+      *p++ =  (c        & 0x3f) | 0x80;
+    }
+  else if ( c <= 0x1fffff )
+    {
+      *p++ =  (c >> 18) | 0xf0;
+      *p++ = ((c >> 12) & 0x3f) | 0x80;
+      *p++ = ((c >>  6) & 0x3f) | 0x80;
+      *p++ =  (c        & 0x3f) | 0x80;
+    }
+  else if ( c <= 0x3ffffff )
+    {
+      *p++ =  (c >> 24) | 0xf8;
+      *p++ = ((c >> 18) & 0x3f) | 0x80;
+      *p++ = ((c >> 12) & 0x3f) | 0x80;
+      *p++ = ((c >>  6) & 0x3f) | 0x80;
+      *p++ =  (c        & 0x3f) | 0x80;
+    }
+  else
+    {
+      *p++ =  (c >> 30) | 0xfc;
+      *p++ = ((c >> 24) & 0x3f) | 0x80;
+      *p++ = ((c >> 18) & 0x3f) | 0x80;
+      *p++ = ((c >> 12) & 0x3f) | 0x80;
+      *p++ = ((c >>  6) & 0x3f) | 0x80;
+      *p++ =  (c        & 0x3f) | 0x80;
+    }
+#else
   BREAKUP_CHAR (c, charset, c1, c2);
   lb = CHAR_LEADING_BYTE (c);
   if (LEADING_BYTE_PRIVATE_P (lb))
   BREAKUP_CHAR (c, charset, c1, c2);
   lb = CHAR_LEADING_BYTE (c);
   if (LEADING_BYTE_PRIVATE_P (lb))
@@ -199,7 +459,7 @@ non_ascii_set_charptr_emchar (Bufbyte *str, Emchar c)
   *p++ = c1 | 0x80;
   if (c2)
     *p++ = c2 | 0x80;
   *p++ = c1 | 0x80;
   if (c2)
     *p++ = c2 | 0x80;
-
+#endif
   return (p - str);
 }
 
   return (p - str);
 }
 
@@ -210,6 +470,49 @@ non_ascii_set_charptr_emchar (Bufbyte *str, Emchar c)
 Emchar
 non_ascii_charptr_emchar (CONST Bufbyte *str)
 {
 Emchar
 non_ascii_charptr_emchar (CONST Bufbyte *str)
 {
+#ifdef UTF2000
+  Bufbyte b;
+  Emchar ch;
+  int len;
+
+  b = *str++;
+  if ( b >= 0xfc )
+    {
+      ch = (b & 0x01);
+      len = 5;
+    }
+  else if ( b >= 0xf8 )
+    {
+      ch = b & 0x03;
+      len = 4;
+    }
+  else if ( b >= 0xf0 )
+    {
+      ch = b & 0x07;
+      len = 3;
+    }
+  else if ( b >= 0xe0 )
+    {
+      ch = b & 0x0f;
+      len = 2;
+    }
+  else if ( b >= 0xc0 )
+    {
+      ch = b & 0x1f;
+      len = 1;
+    }
+  else
+    {
+      ch = b;
+      len = 0;
+    }
+  for( ; len > 0; len-- )
+    {
+      b = *str++;
+      ch = ( ch << 6 ) | ( b & 0x3f );
+    }
+  return ch;
+#else
   Bufbyte i0 = *str, i1, i2 = 0;
   Lisp_Object charset;
 
   Bufbyte i0 = *str, i1, i2 = 0;
   Lisp_Object charset;
 
@@ -226,11 +529,13 @@ non_ascii_charptr_emchar (CONST Bufbyte *str)
     i2 = *++str & 0x7F;
 
   return MAKE_CHAR (charset, i1, i2);
     i2 = *++str & 0x7F;
 
   return MAKE_CHAR (charset, i1, i2);
+#endif
 }
 
 /* Return whether CH is a valid Emchar, assuming it's non-ASCII.
    Do not call this directly.  Use the macro valid_char_p() instead. */
 
 }
 
 /* Return whether CH is a valid Emchar, assuming it's non-ASCII.
    Do not call this directly.  Use the macro valid_char_p() instead. */
 
+#ifndef UTF2000
 int
 non_ascii_valid_char_p (Emchar ch)
 {
 int
 non_ascii_valid_char_p (Emchar ch)
 {
@@ -277,14 +582,16 @@ non_ascii_valid_char_p (Emchar ch)
       if (f2 < 0x20 || f3 < 0x20)
        return 0;
 
       if (f2 < 0x20 || f3 < 0x20)
        return 0;
 
+#ifdef ENABLE_COMPOSITE_CHARS
       if (f1 + FIELD1_TO_OFFICIAL_LEADING_BYTE == LEADING_BYTE_COMPOSITE)
        {
          if (UNBOUNDP (Fgethash (make_int (ch),
       if (f1 + FIELD1_TO_OFFICIAL_LEADING_BYTE == LEADING_BYTE_COMPOSITE)
        {
          if (UNBOUNDP (Fgethash (make_int (ch),
-                                 Vcomposite_char_char2string_hashtable,
+                                 Vcomposite_char_char2string_hash_table,
                                  Qunbound)))
            return 0;
          return 1;
        }
                                  Qunbound)))
            return 0;
          return 1;
        }
+#endif /* ENABLE_COMPOSITE_CHARS */
 
       if (f2 != 0x20 && f2 != 0x7F && f3 != 0x20 && f3 != 0x7F)
        return 1;
 
       if (f2 != 0x20 && f2 != 0x7F && f3 != 0x20 && f3 != 0x7F)
        return 1;
@@ -299,6 +606,7 @@ non_ascii_valid_char_p (Emchar ch)
       return (XCHARSET_CHARS (charset) == 96);
     }
 }
       return (XCHARSET_CHARS (charset) == 96);
     }
 }
+#endif
 
 \f
 /************************************************************************/
 
 \f
 /************************************************************************/
@@ -317,6 +625,10 @@ non_ascii_charptr_copy_char (CONST Bufbyte *ptr, Bufbyte *str)
   switch (REP_BYTES_BY_FIRST_BYTE (*strptr))
     {
       /* Notice fallthrough. */
   switch (REP_BYTES_BY_FIRST_BYTE (*strptr))
     {
       /* Notice fallthrough. */
+#ifdef UTF2000
+    case 6: *++strptr = *ptr++;
+    case 5: *++strptr = *ptr++;
+#endif
     case 4: *++strptr = *ptr++;
     case 3: *++strptr = *ptr++;
     case 2: *++strptr = *ptr;
     case 4: *++strptr = *ptr++;
     case 3: *++strptr = *ptr++;
     case 2: *++strptr = *ptr;
@@ -346,6 +658,16 @@ Lstream_get_emchar_1 (Lstream *stream, int ch)
   switch (REP_BYTES_BY_FIRST_BYTE (ch))
     {
       /* Notice fallthrough. */
   switch (REP_BYTES_BY_FIRST_BYTE (ch))
     {
       /* Notice fallthrough. */
+#ifdef UTF2000
+    case 6:
+      ch = Lstream_getc (stream);
+      assert (ch >= 0);
+      *++strptr = (Bufbyte) ch;
+    case 5:
+      ch = Lstream_getc (stream);
+      assert (ch >= 0);
+      *++strptr = (Bufbyte) ch;
+#endif
     case 4:
       ch = Lstream_getc (stream);
       assert (ch >= 0);
     case 4:
       ch = Lstream_getc (stream);
       assert (ch >= 0);
@@ -391,9 +713,11 @@ mark_charset (Lisp_Object obj, void (*markobj) (Lisp_Object))
 {
   struct Lisp_Charset *cs = XCHARSET (obj);
 
 {
   struct Lisp_Charset *cs = XCHARSET (obj);
 
-  (markobj) (cs->doc_string);
-  (markobj) (cs->registry);
-  (markobj) (cs->ccl_program);
+  markobj (cs->short_name);
+  markobj (cs->long_name);
+  markobj (cs->doc_string);
+  markobj (cs->registry);
+  markobj (cs->ccl_program);
   return cs->name;
 }
 
   return cs->name;
 }
 
@@ -411,6 +735,10 @@ print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
   write_c_string ("#<charset ", printcharfun);
   print_internal (CHARSET_NAME (cs), printcharfun, 0);
   write_c_string (" ", printcharfun);
   write_c_string ("#<charset ", printcharfun);
   print_internal (CHARSET_NAME (cs), printcharfun, 0);
   write_c_string (" ", printcharfun);
+  print_internal (CHARSET_SHORT_NAME (cs), printcharfun, 1);
+  write_c_string (" ", printcharfun);
+  print_internal (CHARSET_LONG_NAME (cs), printcharfun, 1);
+  write_c_string (" ", printcharfun);
   print_internal (CHARSET_DOC_STRING (cs), printcharfun, 1);
   sprintf (buf, " %s %s cols=%d g%d final='%c' reg=",
           CHARSET_TYPE (cs) == CHARSET_TYPE_94    ? "94" :
   print_internal (CHARSET_DOC_STRING (cs), printcharfun, 1);
   sprintf (buf, " %s %s cols=%d g%d final='%c' reg=",
           CHARSET_TYPE (cs) == CHARSET_TYPE_94    ? "94" :
@@ -427,26 +755,36 @@ print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
   write_c_string (buf, printcharfun);
 }
 
   write_c_string (buf, printcharfun);
 }
 
+static const struct lrecord_description charset_description[] = {
+  { XD_LISP_OBJECT, offsetof(struct Lisp_Charset, name), 7 },
+  { XD_END }
+};
+
 DEFINE_LRECORD_IMPLEMENTATION ("charset", charset,
                                mark_charset, print_charset, 0, 0, 0,
 DEFINE_LRECORD_IMPLEMENTATION ("charset", charset,
                                mark_charset, print_charset, 0, 0, 0,
+                              charset_description,
                               struct Lisp_Charset);
 /* Make a new charset. */
 
 static Lisp_Object
                               struct Lisp_Charset);
 /* Make a new charset. */
 
 static Lisp_Object
-make_charset (int id, Lisp_Object name, Bufbyte leading_byte, unsigned char rep_bytes,
+make_charset (Charset_ID id, Lisp_Object name,
              unsigned char type, unsigned char columns, unsigned char graphic,
              unsigned char type, unsigned char columns, unsigned char graphic,
-             Bufbyte final, unsigned char direction, Lisp_Object doc,
-             Lisp_Object reg)
+             Bufbyte final, unsigned char direction, Lisp_Object short_name,
+             Lisp_Object long_name, Lisp_Object doc,
+             Lisp_Object reg,
+             Lisp_Object decoding_table,
+             Emchar ucs_min, Emchar ucs_max,
+             Emchar code_offset, unsigned char byte_offset)
 {
   Lisp_Object obj;
   struct Lisp_Charset *cs =
 {
   Lisp_Object obj;
   struct Lisp_Charset *cs =
-    alloc_lcrecord_type (struct Lisp_Charset, lrecord_charset);
+    alloc_lcrecord_type (struct Lisp_Charset, &lrecord_charset);
   XSETCHARSET (obj, cs);
 
   CHARSET_ID           (cs) = id;
   CHARSET_NAME         (cs) = name;
   XSETCHARSET (obj, cs);
 
   CHARSET_ID           (cs) = id;
   CHARSET_NAME         (cs) = name;
-  CHARSET_LEADING_BYTE (cs) = leading_byte;
-  CHARSET_REP_BYTES    (cs) = rep_bytes;
+  CHARSET_SHORT_NAME   (cs) = short_name;
+  CHARSET_LONG_NAME    (cs) = long_name;
   CHARSET_DIRECTION    (cs) = direction;
   CHARSET_TYPE         (cs) = type;
   CHARSET_COLUMNS      (cs) = columns;
   CHARSET_DIRECTION    (cs) = direction;
   CHARSET_TYPE         (cs) = type;
   CHARSET_COLUMNS      (cs) = columns;
@@ -456,38 +794,141 @@ make_charset (int id, Lisp_Object name, Bufbyte leading_byte, unsigned char rep_
   CHARSET_REGISTRY     (cs) = reg;
   CHARSET_CCL_PROGRAM  (cs) = Qnil;
   CHARSET_REVERSE_DIRECTION_CHARSET (cs) = Qnil;
   CHARSET_REGISTRY     (cs) = reg;
   CHARSET_CCL_PROGRAM  (cs) = Qnil;
   CHARSET_REVERSE_DIRECTION_CHARSET (cs) = Qnil;
+#ifdef UTF2000
+  CHARSET_DECODING_TABLE(cs) = decoding_table;
+  CHARSET_UCS_MIN(cs) = ucs_min;
+  CHARSET_UCS_MAX(cs) = ucs_max;
+  CHARSET_CODE_OFFSET(cs) = code_offset;
+  CHARSET_BYTE_OFFSET(cs) = byte_offset;
+#endif
+  
+  switch ( CHARSET_TYPE (cs) )
+    {
+    case CHARSET_TYPE_94:
+      CHARSET_DIMENSION (cs) = 1;
+      CHARSET_CHARS (cs) = 94;
+#ifdef UTF2000
+      if (!EQ (decoding_table, Qnil))
+       {
+         size_t i;
+         CHARSET_TO_BYTE1_TABLE(cs) = make_byte_from_character_table();
+         for (i = 0; i < 94; i++)
+           {
+             Lisp_Object c = XVECTOR_DATA(decoding_table)[i];
+
+             if (!EQ (c, Qnil))
+               put_byte_from_character_table (XCHAR (c), i + 33,
+                                              CHARSET_TO_BYTE1_TABLE(cs));
+           }
+       }
+      else
+       CHARSET_TO_BYTE1_TABLE(cs) = NULL;
+      CHARSET_TO_BYTE2_TABLE(cs) = NULL;
+#endif
+      break;
+    case CHARSET_TYPE_96:
+      CHARSET_DIMENSION (cs) = 1;
+      CHARSET_CHARS (cs) = 96;
+#ifdef UTF2000
+      if (!EQ (decoding_table, Qnil))
+       {
+         size_t i;
+         CHARSET_TO_BYTE1_TABLE(cs) = make_byte_from_character_table();
+         for (i = 0; i < 96; i++)
+           {
+             Lisp_Object c = XVECTOR_DATA(decoding_table)[i];
+
+             if (!EQ (c, Qnil))
+               put_byte_from_character_table (XCHAR (c), i + 32,
+                                              CHARSET_TO_BYTE1_TABLE(cs));
+           }
+       }
+      else
+       CHARSET_TO_BYTE1_TABLE(cs) = NULL;
+      CHARSET_TO_BYTE2_TABLE(cs) = NULL;
+#endif
+      break;
+    case CHARSET_TYPE_94X94:
+      CHARSET_DIMENSION (cs) = 2;
+      CHARSET_CHARS (cs) = 94;
+#ifdef UTF2000
+      CHARSET_TO_BYTE1_TABLE(cs) = NULL;
+      CHARSET_TO_BYTE2_TABLE(cs) = NULL;
+#endif
+      break;
+    case CHARSET_TYPE_96X96:
+      CHARSET_DIMENSION (cs) = 2;
+      CHARSET_CHARS (cs) = 96;
+#ifdef UTF2000
+      CHARSET_TO_BYTE1_TABLE(cs) = NULL;
+      CHARSET_TO_BYTE2_TABLE(cs) = NULL;
+#endif
+      break;
+#ifdef UTF2000
+    case CHARSET_TYPE_128X128:
+      CHARSET_DIMENSION (cs) = 2;
+      CHARSET_CHARS (cs) = 128;
+#ifdef UTF2000
+      CHARSET_TO_BYTE1_TABLE(cs) = NULL;
+      CHARSET_TO_BYTE2_TABLE(cs) = NULL;
+#endif
+      break;
+    case CHARSET_TYPE_256X256:
+      CHARSET_DIMENSION (cs) = 2;
+      CHARSET_CHARS (cs) = 256;
+#ifdef UTF2000
+      CHARSET_TO_BYTE1_TABLE(cs) = NULL;
+      CHARSET_TO_BYTE2_TABLE(cs) = NULL;
+#endif
+      break;
+#endif
+    }
 
 
-  CHARSET_DIMENSION     (cs) = (CHARSET_TYPE (cs) == CHARSET_TYPE_94 ||
-                               CHARSET_TYPE (cs) == CHARSET_TYPE_96) ? 1 : 2;
-  CHARSET_CHARS         (cs) = (CHARSET_TYPE (cs) == CHARSET_TYPE_94 ||
-                               CHARSET_TYPE (cs) == CHARSET_TYPE_94X94) ? 94 : 96;
-    
+#ifndef UTF2000
+  if (id == LEADING_BYTE_ASCII)
+    CHARSET_REP_BYTES (cs) = 1;
+  else if (id < 0xA0)
+    CHARSET_REP_BYTES (cs) = CHARSET_DIMENSION (cs) + 1;
+  else
+    CHARSET_REP_BYTES (cs) = CHARSET_DIMENSION (cs) + 2;
+#endif
+  
   if (final)
     {
       /* some charsets do not have final characters.  This includes
         ASCII, Control-1, Composite, and the two faux private
         charsets. */
   if (final)
     {
       /* some charsets do not have final characters.  This includes
         ASCII, Control-1, Composite, and the two faux private
         charsets. */
+#if UTF2000
+      if (code_offset == 0)
+       {
+         assert (NILP (charset_by_attributes[type][final]));
+         charset_by_attributes[type][final] = obj;
+       }
+#else
       assert (NILP (charset_by_attributes[type][final][direction]));
       charset_by_attributes[type][final][direction] = obj;
       assert (NILP (charset_by_attributes[type][final][direction]));
       charset_by_attributes[type][final][direction] = obj;
+#endif
     }
 
     }
 
-  assert (NILP (charset_by_leading_byte[leading_byte - 128]));
-  charset_by_leading_byte[leading_byte - 128] = obj;
-  if (leading_byte < 0xA0)
+  assert (NILP (charset_by_leading_byte[id - MIN_LEADING_BYTE]));
+  charset_by_leading_byte[id - MIN_LEADING_BYTE] = obj;
+#ifndef UTF2000
+  if (id < 0xA0)
     /* official leading byte */
     /* official leading byte */
-    rep_bytes_by_first_byte[leading_byte] = rep_bytes;
+    rep_bytes_by_first_byte[id] = CHARSET_REP_BYTES (cs);
+#endif
 
   /* Some charsets are "faux" and don't have names or really exist at
      all except in the leading-byte table. */
   if (!NILP (name))
 
   /* Some charsets are "faux" and don't have names or really exist at
      all except in the leading-byte table. */
   if (!NILP (name))
-    Fputhash (name, obj, Vcharset_hashtable);
+    Fputhash (name, obj, Vcharset_hash_table);
   return obj;
 }
 
 static int
 get_unallocated_leading_byte (int dimension)
 {
   return obj;
 }
 
 static int
 get_unallocated_leading_byte (int dimension)
 {
-  int lb;
+  Charset_ID lb;
 
   if (dimension == 1)
     {
 
   if (dimension == 1)
     {
@@ -512,6 +953,117 @@ get_unallocated_leading_byte (int dimension)
   return lb;
 }
 
   return lb;
 }
 
+#ifdef UTF2000
+unsigned char
+charset_get_byte1 (Lisp_Object charset, Emchar ch)
+{
+  Emchar_to_byte_table* table;
+  int d;
+
+  if ((table = XCHARSET_TO_BYTE1_TABLE (charset)) != NULL)
+    return get_byte_from_character_table (ch, table);
+  else if ((XCHARSET_UCS_MIN (charset) <= ch)
+          && (ch <= XCHARSET_UCS_MAX (charset)))
+    return (ch - XCHARSET_UCS_MIN (charset)
+           + XCHARSET_CODE_OFFSET (charset))
+      / (XCHARSET_DIMENSION (charset) == 1 ?
+        1
+        :
+        XCHARSET_DIMENSION (charset) == 2 ?
+        XCHARSET_CHARS (charset)
+        :
+        XCHARSET_DIMENSION (charset) == 3 ?
+        XCHARSET_CHARS (charset) * XCHARSET_CHARS (charset)
+        :
+        XCHARSET_CHARS (charset)
+        * XCHARSET_CHARS (charset) * XCHARSET_CHARS (charset))
+      + XCHARSET_BYTE_OFFSET (charset);
+  else if (XCHARSET_CODE_OFFSET (charset) == 0)
+    {
+      if (XCHARSET_DIMENSION (charset) == 1)
+       {
+         if (XCHARSET_CHARS (charset) == 94)
+           {
+             if (((d = ch - (MIN_CHAR_94
+                             + (XCHARSET_FINAL (charset) - '0') * 94)) >= 0)
+                 && (d < 94))
+               return d + 33;
+           }
+         else if (XCHARSET_CHARS (charset) == 96)
+           {
+             if (((d = ch - (MIN_CHAR_96
+                             + (XCHARSET_FINAL (charset) - '0') * 96)) >= 0)
+                 && (d < 96))
+               return d + 32;
+           }
+         else
+           return 0;
+       }
+      else if (XCHARSET_DIMENSION (charset) == 2)
+       {
+         if (XCHARSET_CHARS (charset) == 94)
+           {
+             if (((d = ch - (MIN_CHAR_94x94
+                             + (XCHARSET_FINAL (charset) - '0') * 94 * 94))
+                  >= 0)
+                 && (d < 94 * 94))
+               return (d / 94) + 33;
+           }
+         else if (XCHARSET_CHARS (charset) == 96)
+           {
+             if (((d = ch - (MIN_CHAR_96x96
+                             + (XCHARSET_FINAL (charset) - '0') * 96 * 96))
+                  >= 0)
+                 && (d < 96 * 96))
+               return (d / 96) + 32;
+           }
+       }
+    }
+  return 0;
+}
+
+unsigned char
+charset_get_byte2 (Lisp_Object charset, Emchar ch)
+{
+  if (XCHARSET_DIMENSION (charset) == 1)
+    return 0;
+  else
+    {
+      Emchar_to_byte_table* table;
+
+      if ((table = XCHARSET_TO_BYTE2_TABLE (charset)) != NULL)
+       return get_byte_from_character_table (ch, table);
+      else if ((XCHARSET_UCS_MIN (charset) <= ch)
+              && (ch <= XCHARSET_UCS_MAX (charset)))
+       return ((ch - XCHARSET_UCS_MIN (charset)
+                + XCHARSET_CODE_OFFSET (charset))
+               / (XCHARSET_DIMENSION (charset) == 2 ?
+                  1
+                  :
+                  XCHARSET_DIMENSION (charset) == 3 ?
+                  XCHARSET_CHARS (charset)
+                  :
+                  XCHARSET_CHARS (charset) * XCHARSET_CHARS (charset)))
+         % XCHARSET_CHARS (charset)
+         + XCHARSET_BYTE_OFFSET (charset);
+      else if (XCHARSET_CHARS (charset) == 94)
+       return (MIN_CHAR_94x94
+               + (XCHARSET_FINAL (charset) - '0') * 94 * 94 <= ch)
+         && (ch < MIN_CHAR_94x94
+             + (XCHARSET_FINAL (charset) - '0' + 1) * 94 * 94) ?
+         ((ch - MIN_CHAR_94x94) % 94) + 33 : 0;
+      else /* if (XCHARSET_CHARS (charset) == 96) */
+       return (MIN_CHAR_96x96
+               + (XCHARSET_FINAL (charset) - '0') * 96 * 96 <= ch)
+         && (ch < MIN_CHAR_96x96
+             + (XCHARSET_FINAL (charset) - '0' + 1) * 96 * 96) ?
+         ((ch - MIN_CHAR_96x96) % 96) + 32 : 0;
+    }
+}
+
+Lisp_Object Vdefault_coded_charset_priority_list;
+#endif
+
 \f
 /************************************************************************/
 /*                      Basic charset Lisp functions                    */
 \f
 /************************************************************************/
 /*                      Basic charset Lisp functions                    */
@@ -537,7 +1089,7 @@ nil is returned.  Otherwise the associated charset object is returned.
     return charset_or_name;
 
   CHECK_SYMBOL (charset_or_name);
     return charset_or_name;
 
   CHECK_SYMBOL (charset_or_name);
-  return Fgethash (charset_or_name, Vcharset_hashtable, Qnil);
+  return Fgethash (charset_or_name, Vcharset_hash_table, Qnil);
 }
 
 DEFUN ("get-charset", Fget_charset, 1, 1, 0, /*
 }
 
 DEFUN ("get-charset", Fget_charset, 1, 1, 0, /*
@@ -563,19 +1115,15 @@ struct charset_list_closure
 };
 
 static int
 };
 
 static int
-add_charset_to_list_mapper (CONST void *hash_key, void *hash_contents,
+add_charset_to_list_mapper (Lisp_Object key, Lisp_Object value,
                            void *charset_list_closure)
 {
   /* This function can GC */
                            void *charset_list_closure)
 {
   /* This function can GC */
-  Lisp_Object key, contents;
-  Lisp_Object *charset_list;
   struct charset_list_closure *chcl =
     (struct charset_list_closure*) charset_list_closure;
   struct charset_list_closure *chcl =
     (struct charset_list_closure*) charset_list_closure;
-  CVOID_TO_LISP (key, hash_key);
-  VOID_TO_LISP (contents, hash_contents);
-  charset_list = chcl->charset_list;
+  Lisp_Object *charset_list = chcl->charset_list;
 
 
-  *charset_list = Fcons (XCHARSET_NAME (contents), *charset_list);
+  *charset_list = Fcons (XCHARSET_NAME (value), *charset_list);
   return 0;
 }
 
   return 0;
 }
 
@@ -590,7 +1138,7 @@ Return a list of the names of all defined charsets.
 
   GCPRO1 (charset_list);
   charset_list_closure.charset_list = &charset_list;
 
   GCPRO1 (charset_list);
   charset_list_closure.charset_list = &charset_list;
-  elisp_maphash (add_charset_to_list_mapper, Vcharset_hashtable,
+  elisp_maphash (add_charset_to_list_mapper, Vcharset_hash_table,
                 &charset_list_closure);
   UNGCPRO;
 
                 &charset_list_closure);
   UNGCPRO;
 
@@ -613,6 +1161,8 @@ DOC-STRING is a string describing the character set.
 PROPS is a property list, describing the specific nature of the
 character set.  Recognized properties are:
 
 PROPS is a property list, describing the specific nature of the
 character set.  Recognized properties are:
 
+'short-name    Short version of the charset name (ex: Latin-1)
+'long-name     Long version of the charset name (ex: ISO8859-1 (Latin-1))
 'registry      A regular expression matching the font registry field for
                this character set.
 'dimension     Number of octets used to index a character in this charset.
 'registry      A regular expression matching the font registry field for
                this character set.
 'dimension     Number of octets used to index a character in this charset.
@@ -652,13 +1202,14 @@ character set.  Recognized properties are:
 */
        (name, doc_string, props))
 {
 */
        (name, doc_string, props))
 {
-  int lb, dimension = 1, chars = 94, graphic = 0, final = 0, columns = -1;
+  int id, dimension = 1, chars = 94, graphic = 0, final = 0, columns = -1;
   int direction = CHARSET_LEFT_TO_RIGHT;
   int type;
   Lisp_Object registry = Qnil;
   Lisp_Object charset;
   Lisp_Object rest, keyword, value;
   Lisp_Object ccl_program = Qnil;
   int direction = CHARSET_LEFT_TO_RIGHT;
   int type;
   Lisp_Object registry = Qnil;
   Lisp_Object charset;
   Lisp_Object rest, keyword, value;
   Lisp_Object ccl_program = Qnil;
+  Lisp_Object short_name = Qnil, long_name = Qnil;
 
   CHECK_SYMBOL (name);
   if (!NILP (doc_string))
 
   CHECK_SYMBOL (name);
   if (!NILP (doc_string))
@@ -670,7 +1221,19 @@ character set.  Recognized properties are:
 
   EXTERNAL_PROPERTY_LIST_LOOP (rest, keyword, value, props)
     {
 
   EXTERNAL_PROPERTY_LIST_LOOP (rest, keyword, value, props)
     {
-      if (EQ (keyword, Qdimension))
+      if (EQ (keyword, Qshort_name))
+       {
+         CHECK_STRING (value);
+         short_name = value;
+       }
+
+      if (EQ (keyword, Qlong_name))
+       {
+         CHECK_STRING (value);
+         long_name = value;
+       }
+
+      else if (EQ (keyword, Qdimension))
        {
          CHECK_INT (value);
          dimension = XINT (value);
        {
          CHECK_INT (value);
          dimension = XINT (value);
@@ -753,7 +1316,45 @@ character set.  Recognized properties are:
     error
       ("Character set already defined for this DIMENSION/CHARS/FINAL combo");
 
     error
       ("Character set already defined for this DIMENSION/CHARS/FINAL combo");
 
-  lb = get_unallocated_leading_byte (dimension);
+#ifdef UTF2000
+  if (dimension == 1)
+    {
+      if (chars == 94)
+       {
+         /* id = CHARSET_ID_OFFSET_94 + final; */
+         id = get_unallocated_leading_byte (dimension);
+       }
+      else if (chars == 96)
+       {
+         id = get_unallocated_leading_byte (dimension);
+       }
+      else
+       {
+         abort ();
+       }
+    }
+  else if (dimension == 2)
+    {
+      if (chars == 94)
+       {
+         id = get_unallocated_leading_byte (dimension);
+       }
+      else if (chars == 96)
+       {
+         id = get_unallocated_leading_byte (dimension);
+       }
+      else
+       {
+         abort ();
+       }
+    }
+  else
+    {
+      abort ();
+    }
+#else
+  id = get_unallocated_leading_byte (dimension);
+#endif
 
   if (NILP (doc_string))
     doc_string = build_string ("");
 
   if (NILP (doc_string))
     doc_string = build_string ("");
@@ -761,10 +1362,18 @@ character set.  Recognized properties are:
   if (NILP (registry))
     registry = build_string ("");
 
   if (NILP (registry))
     registry = build_string ("");
 
+  if (NILP (short_name))
+    XSETSTRING (short_name, XSYMBOL (name)->name);
+
+  if (NILP (long_name))
+    long_name = doc_string;
+
   if (columns == -1)
     columns = dimension;
   if (columns == -1)
     columns = dimension;
-  charset = make_charset (-1, name, lb, dimension + 2, type, columns, graphic,
-                         final, direction, doc_string, registry);
+  charset = make_charset (id, name, type, columns, graphic,
+                         final, direction, short_name, long_name,
+                         doc_string, registry,
+                         Qnil, 0, 0, 0, 0);
   if (!NILP (ccl_program))
     XCHARSET_CCL_PROGRAM (charset) = ccl_program;
   return charset;
   if (!NILP (ccl_program))
     XCHARSET_CCL_PROGRAM (charset) = ccl_program;
   return charset;
@@ -778,9 +1387,9 @@ NEW-NAME is the name of the new charset.  Return the new charset.
        (charset, new_name))
 {
   Lisp_Object new_charset = Qnil;
        (charset, new_name))
 {
   Lisp_Object new_charset = Qnil;
-  int lb, dimension, columns, graphic, final;
+  int id, dimension, columns, graphic, final;
   int direction, type;
   int direction, type;
-  Lisp_Object registry, doc_string;
+  Lisp_Object registry, doc_string, short_name, long_name;
   struct Lisp_Charset *cs;
 
   charset = Fget_charset (charset);
   struct Lisp_Charset *cs;
 
   charset = Fget_charset (charset);
@@ -797,7 +1406,7 @@ NEW-NAME is the name of the new charset.  Return the new charset.
   type      = CHARSET_TYPE      (cs);
   columns   = CHARSET_COLUMNS   (cs);
   dimension = CHARSET_DIMENSION (cs);
   type      = CHARSET_TYPE      (cs);
   columns   = CHARSET_COLUMNS   (cs);
   dimension = CHARSET_DIMENSION (cs);
-  lb = get_unallocated_leading_byte (dimension);
+  id = get_unallocated_leading_byte (dimension);
 
   graphic = CHARSET_GRAPHIC (cs);
   final = CHARSET_FINAL (cs);
 
   graphic = CHARSET_GRAPHIC (cs);
   final = CHARSET_FINAL (cs);
@@ -805,10 +1414,23 @@ NEW-NAME is the name of the new charset.  Return the new charset.
   if (CHARSET_DIRECTION (cs) == CHARSET_RIGHT_TO_LEFT)
     direction = CHARSET_LEFT_TO_RIGHT;
   doc_string = CHARSET_DOC_STRING (cs);
   if (CHARSET_DIRECTION (cs) == CHARSET_RIGHT_TO_LEFT)
     direction = CHARSET_LEFT_TO_RIGHT;
   doc_string = CHARSET_DOC_STRING (cs);
+  short_name = CHARSET_SHORT_NAME (cs);
+  long_name = CHARSET_LONG_NAME (cs);
   registry = CHARSET_REGISTRY (cs);
 
   registry = CHARSET_REGISTRY (cs);
 
-  new_charset = make_charset (-1, new_name, lb, dimension + 2, type, columns,
-                             graphic, final, direction, doc_string, registry);
+  new_charset = make_charset (id, new_name, type, columns,
+                             graphic, final, direction, short_name, long_name,
+                             doc_string, registry,
+#ifdef UTF2000
+                             CHARSET_DECODING_TABLE(cs),
+                             CHARSET_UCS_MIN(cs),
+                             CHARSET_UCS_MAX(cs),
+                             CHARSET_CODE_OFFSET(cs),
+                             CHARSET_BYTE_OFFSET(cs)
+#else
+                             Qnil, 0, 0, 0
+#endif
+);
 
   CHARSET_REVERSE_DIRECTION_CHARSET (cs) = new_charset;
   XCHARSET_REVERSE_DIRECTION_CHARSET (new_charset) = charset;
 
   CHARSET_REVERSE_DIRECTION_CHARSET (cs) = new_charset;
   XCHARSET_REVERSE_DIRECTION_CHARSET (new_charset) = charset;
@@ -888,8 +1510,24 @@ will be returned if character sets exist for both directions).
   return obj;
 }
 
   return obj;
 }
 
-DEFUN ("charset-doc-string", Fcharset_doc_string, 1, 1, 0, /*
-Return doc string of CHARSET.
+DEFUN ("charset-short-name", Fcharset_short_name, 1, 1, 0, /*
+Return short name of CHARSET.
+*/
+       (charset))
+{
+  return XCHARSET_SHORT_NAME (Fget_charset (charset));
+}
+
+DEFUN ("charset-long-name", Fcharset_long_name, 1, 1, 0, /*
+Return long name of CHARSET.
+*/
+       (charset))
+{
+  return XCHARSET_LONG_NAME (Fget_charset (charset));
+}
+
+DEFUN ("charset-description", Fcharset_description, 1, 1, 0, /*
+Return description of CHARSET.
 */
        (charset))
 {
 */
        (charset))
 {
@@ -918,6 +1556,8 @@ Recognized properties are those listed in `make-charset', as well as
 
   CHECK_SYMBOL (prop);
   if (EQ (prop, Qname))        return CHARSET_NAME (cs);
 
   CHECK_SYMBOL (prop);
   if (EQ (prop, Qname))        return CHARSET_NAME (cs);
+  if (EQ (prop, Qshort_name))  return CHARSET_SHORT_NAME (cs);
+  if (EQ (prop, Qlong_name))   return CHARSET_LONG_NAME (cs);
   if (EQ (prop, Qdoc_string))  return CHARSET_DOC_STRING (cs);
   if (EQ (prop, Qdimension))   return make_int (CHARSET_DIMENSION (cs));
   if (EQ (prop, Qcolumns))     return make_int (CHARSET_COLUMNS (cs));
   if (EQ (prop, Qdoc_string))  return CHARSET_DOC_STRING (cs);
   if (EQ (prop, Qdimension))   return make_int (CHARSET_DIMENSION (cs));
   if (EQ (prop, Qcolumns))     return make_int (CHARSET_COLUMNS (cs));
@@ -945,7 +1585,7 @@ Return charset identification number of CHARSET.
 */
        (charset))
 {
 */
        (charset))
 {
-  return make_int(XCHARSET_ID (Fget_charset (charset)));
+  return make_int(XCHARSET_LEADING_BYTE (Fget_charset (charset)));
 }
 
 /* #### We need to figure out which properties we really want to
 }
 
 /* #### We need to figure out which properties we really want to
@@ -966,17 +1606,16 @@ static void
 invalidate_charset_font_caches (Lisp_Object charset)
 {
   /* Invalidate font cache entries for charset on all devices. */
 invalidate_charset_font_caches (Lisp_Object charset)
 {
   /* Invalidate font cache entries for charset on all devices. */
-  Lisp_Object devcons, concons, hashtab;
+  Lisp_Object devcons, concons, hash_table;
   DEVICE_LOOP_NO_BREAK (devcons, concons)
     {
       struct device *d = XDEVICE (XCAR (devcons));
   DEVICE_LOOP_NO_BREAK (devcons, concons)
     {
       struct device *d = XDEVICE (XCAR (devcons));
-      hashtab = Fgethash (charset, d->charset_font_cache, Qunbound);
-      if (!UNBOUNDP (hashtab))
-        Fclrhash (hashtab);
+      hash_table = Fgethash (charset, d->charset_font_cache, Qunbound);
+      if (!UNBOUNDP (hash_table))
+        Fclrhash (hash_table);
     }
 }
 
     }
 }
 
-/* Japanese folks may want to (set-charset-registry 'ascii "jisx0201") */
 DEFUN ("set-charset-registry", Fset_charset_registry, 2, 2, 0, /*
 Set the 'registry property of CHARSET to REGISTRY.
 */
 DEFUN ("set-charset-registry", Fset_charset_registry, 2, 2, 0, /*
 Set the 'registry property of CHARSET to REGISTRY.
 */
@@ -990,13 +1629,26 @@ Set the 'registry property of CHARSET to REGISTRY.
   return Qnil;
 }
 
   return Qnil;
 }
 
+#ifdef UTF2000
+DEFUN ("charset-mapping-table", Fcharset_mapping_table, 1, 1, 0, /*
+Set the 'registry property of CHARSET to REGISTRY.
+*/
+       (charset))
+{
+  return XCHARSET_DECODING_TABLE (Fget_charset (charset));
+}
+#endif
+
 \f
 /************************************************************************/
 /*              Lisp primitives for working with characters             */
 /************************************************************************/
 
 DEFUN ("make-char", Fmake_char, 2, 3, 0, /*
 \f
 /************************************************************************/
 /*              Lisp primitives for working with characters             */
 /************************************************************************/
 
 DEFUN ("make-char", Fmake_char, 2, 3, 0, /*
-Make a multi-byte character from CHARSET and octets ARG1 and ARG2.
+Make a character from CHARSET and octets ARG1 and ARG2.
+ARG2 is required only for characters from two-dimensional charsets.
+For example, (make-char 'latin-iso8859-2 185) will return the Latin 2
+character s with caron.
 */
        (charset, arg1, arg2))
 {
 */
        (charset, arg1, arg2))
 {
@@ -1009,11 +1661,24 @@ Make a multi-byte character from CHARSET and octets ARG1 and ARG2.
 
   if      (EQ (charset, Vcharset_ascii))     lowlim =  0, highlim = 127;
   else if (EQ (charset, Vcharset_control_1)) lowlim =  0, highlim =  31;
 
   if      (EQ (charset, Vcharset_ascii))     lowlim =  0, highlim = 127;
   else if (EQ (charset, Vcharset_control_1)) lowlim =  0, highlim =  31;
+#ifdef UTF2000
+  else if (CHARSET_CHARS (cs) == 256)        lowlim =  0, highlim = 255;
+#endif
   else if (CHARSET_CHARS (cs) == 94)         lowlim = 33, highlim = 126;
   else /* CHARSET_CHARS (cs) == 96) */      lowlim = 32, highlim = 127;
 
   CHECK_INT (arg1);
   else if (CHARSET_CHARS (cs) == 94)         lowlim = 33, highlim = 126;
   else /* CHARSET_CHARS (cs) == 96) */      lowlim = 32, highlim = 127;
 
   CHECK_INT (arg1);
+  /* It is useful (and safe, according to Olivier Galibert) to strip
+     the 8th bit off ARG1 and ARG2 becaue it allows programmers to
+     write (make-char 'latin-iso8859-2 CODE) where code is the actual
+     Latin 2 code of the character.  */
+#ifdef UTF2000
+  a1 = XINT (arg1);
+  if (highlim < 128)
+    a1 &= 0x7f;
+#else
   a1 = XINT (arg1);
   a1 = XINT (arg1);
+#endif
   if (a1 < lowlim || a1 > highlim)
     args_out_of_range_3 (arg1, make_int (lowlim), make_int (highlim));
 
   if (a1 < lowlim || a1 > highlim)
     args_out_of_range_3 (arg1, make_int (lowlim), make_int (highlim));
 
@@ -1026,7 +1691,13 @@ Make a multi-byte character from CHARSET and octets ARG1 and ARG2.
     }
 
   CHECK_INT (arg2);
     }
 
   CHECK_INT (arg2);
+#ifdef UTF2000
   a2 = XINT (arg2);
   a2 = XINT (arg2);
+  if (highlim < 128)
+    a2 &= 0x7f;
+#else
+  a2 = XINT (arg2) & 0x7f;
+#endif
   if (a2 < lowlim || a2 > highlim)
     args_out_of_range_3 (arg2, make_int (lowlim), make_int (highlim));
 
   if (a2 < lowlim || a2 > highlim)
     args_out_of_range_3 (arg2, make_int (lowlim), make_int (highlim));
 
@@ -1040,34 +1711,40 @@ Return the character set of char CH.
 {
   CHECK_CHAR_COERCE_INT (ch);
 
 {
   CHECK_CHAR_COERCE_INT (ch);
 
-  return XCHARSET_NAME (CHARSET_BY_LEADING_BYTE
-                       (CHAR_LEADING_BYTE (XCHAR (ch))));
+  return XCHARSET_NAME (CHAR_CHARSET (XCHAR (ch)));
 }
 
 }
 
-DEFUN ("char-octet", Fchar_octet, 1, 2, 0, /*
-Return the octet numbered N (should be 0 or 1) of char CH.
-N defaults to 0 if omitted.
+DEFUN ("split-char", Fsplit_char, 1, 1, 0, /*
+Return list of charset and one or two position-codes of CHAR.
 */
 */
-       (ch, n))
+       (character))
 {
 {
-  Lisp_Object charset;
-  int c1, c2, int_n;
+  /* This function can GC */
+  struct gcpro gcpro1, gcpro2;
+  Lisp_Object charset = Qnil;
+  Lisp_Object rc = Qnil;
+  int c1, c2;
 
 
-  CHECK_CHAR_COERCE_INT (ch);
-  if (NILP (n))
-    int_n = 0;
+  GCPRO2 (charset, rc);
+  CHECK_CHAR_COERCE_INT (character);
+
+  BREAKUP_CHAR (XCHAR (character), charset, c1, c2);
+
+  if (XCHARSET_DIMENSION (Fget_charset (charset)) == 2)
+    {
+      rc = list3 (XCHARSET_NAME (charset), make_int (c1), make_int (c2));
+    }
   else
     {
   else
     {
-      CHECK_INT (n);
-      int_n = XINT (n);
-      if (int_n != 0 && int_n != 1)
-       signal_simple_error ("Octet number must be 0 or 1", n);
+      rc = list2 (XCHARSET_NAME (charset), make_int (c1));
     }
     }
-  BREAKUP_CHAR (XCHAR (ch), charset, c1, c2);
-  return make_int (int_n == 0 ? c1 : c2);
+  UNGCPRO;
+
+  return rc;
 }
 
 \f
 }
 
 \f
+#ifdef ENABLE_COMPOSITE_CHARS
 /************************************************************************/
 /*                     composite character functions                    */
 /************************************************************************/
 /************************************************************************/
 /*                     composite character functions                    */
 /************************************************************************/
@@ -1077,7 +1754,7 @@ lookup_composite_char (Bufbyte *str, int len)
 {
   Lisp_Object lispstr = make_string (str, len);
   Lisp_Object ch = Fgethash (lispstr,
 {
   Lisp_Object lispstr = make_string (str, len);
   Lisp_Object ch = Fgethash (lispstr,
-                            Vcomposite_char_string2char_hashtable,
+                            Vcomposite_char_string2char_hash_table,
                             Qunbound);
   Emchar emch;
 
                             Qunbound);
   Emchar emch;
 
@@ -1088,9 +1765,9 @@ lookup_composite_char (Bufbyte *str, int len)
       emch = MAKE_CHAR (Vcharset_composite, composite_char_row_next,
                        composite_char_col_next);
       Fputhash (make_char (emch), lispstr,
       emch = MAKE_CHAR (Vcharset_composite, composite_char_row_next,
                        composite_char_col_next);
       Fputhash (make_char (emch), lispstr,
-               Vcomposite_char_char2string_hashtable);
+               Vcomposite_char_char2string_hash_table);
       Fputhash (lispstr, make_char (emch),
       Fputhash (lispstr, make_char (emch),
-               Vcomposite_char_string2char_hashtable);
+               Vcomposite_char_string2char_hash_table);
       composite_char_col_next++;
       if (composite_char_col_next >= 128)
        {
       composite_char_col_next++;
       if (composite_char_col_next >= 128)
        {
@@ -1107,13 +1784,13 @@ Lisp_Object
 composite_char_string (Emchar ch)
 {
   Lisp_Object str = Fgethash (make_char (ch),
 composite_char_string (Emchar ch)
 {
   Lisp_Object str = Fgethash (make_char (ch),
-                             Vcomposite_char_char2string_hashtable,
+                             Vcomposite_char_char2string_hash_table,
                              Qunbound);
   assert (!UNBOUNDP (str));
   return str;
 }
 
                              Qunbound);
   assert (!UNBOUNDP (str));
   return str;
 }
 
-DEFUN ("make-composite-char", Fmake_composite_char, 1, 1, 0, /*
+xxDEFUN ("make-composite-char", Fmake_composite_char, 1, 1, 0, /*
 Convert a string into a single composite character.
 The character is the result of overstriking all the characters in
 the string.
 Convert a string into a single composite character.
 The character is the result of overstriking all the characters in
 the string.
@@ -1125,7 +1802,7 @@ the string.
                                           XSTRING_LENGTH (string)));
 }
 
                                           XSTRING_LENGTH (string)));
 }
 
-DEFUN ("composite-char-string", Fcomposite_char_string, 1, 1, 0, /*
+xxDEFUN ("composite-char-string", Fcomposite_char_string, 1, 1, 0, /*
 Return a string of the characters comprising a composite character.
 */
        (ch))
 Return a string of the characters comprising a composite character.
 */
        (ch))
@@ -1138,6 +1815,7 @@ Return a string of the characters comprising a composite character.
     signal_simple_error ("Must be composite char", ch);
   return composite_char_string (emch);
 }
     signal_simple_error ("Must be composite char", ch);
   return composite_char_string (emch);
 }
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 \f
 /************************************************************************/
 
 \f
 /************************************************************************/
@@ -1156,19 +1834,26 @@ syms_of_mule_charset (void)
   DEFSUBR (Fmake_reverse_direction_charset);
   /*  DEFSUBR (Freverse_direction_charset); */
   DEFSUBR (Fcharset_from_attributes);
   DEFSUBR (Fmake_reverse_direction_charset);
   /*  DEFSUBR (Freverse_direction_charset); */
   DEFSUBR (Fcharset_from_attributes);
-  DEFSUBR (Fcharset_doc_string);
+  DEFSUBR (Fcharset_short_name);
+  DEFSUBR (Fcharset_long_name);
+  DEFSUBR (Fcharset_description);
   DEFSUBR (Fcharset_dimension);
   DEFSUBR (Fcharset_property);
   DEFSUBR (Fcharset_id);
   DEFSUBR (Fset_charset_ccl_program);
   DEFSUBR (Fset_charset_registry);
   DEFSUBR (Fcharset_dimension);
   DEFSUBR (Fcharset_property);
   DEFSUBR (Fcharset_id);
   DEFSUBR (Fset_charset_ccl_program);
   DEFSUBR (Fset_charset_registry);
+#ifdef UTF2000
+  DEFSUBR (Fcharset_mapping_table);
+#endif
 
   DEFSUBR (Fmake_char);
   DEFSUBR (Fchar_charset);
 
   DEFSUBR (Fmake_char);
   DEFSUBR (Fchar_charset);
-  DEFSUBR (Fchar_octet);
+  DEFSUBR (Fsplit_char);
 
 
+#ifdef ENABLE_COMPOSITE_CHARS
   DEFSUBR (Fmake_composite_char);
   DEFSUBR (Fcomposite_char_string);
   DEFSUBR (Fmake_composite_char);
   DEFSUBR (Fcomposite_char_string);
+#endif
 
   defsymbol (&Qcharsetp, "charsetp");
   defsymbol (&Qregistry, "registry");
 
   defsymbol (&Qcharsetp, "charsetp");
   defsymbol (&Qregistry, "registry");
@@ -1176,12 +1861,13 @@ syms_of_mule_charset (void)
   defsymbol (&Qgraphic, "graphic");
   defsymbol (&Qdirection, "direction");
   defsymbol (&Qreverse_direction_charset, "reverse-direction-charset");
   defsymbol (&Qgraphic, "graphic");
   defsymbol (&Qdirection, "direction");
   defsymbol (&Qreverse_direction_charset, "reverse-direction-charset");
-  defsymbol (&Qccl_program, "ccl-program");
+  defsymbol (&Qshort_name, "short-name");
+  defsymbol (&Qlong_name, "long-name");
 
   defsymbol (&Ql2r, "l2r");
   defsymbol (&Qr2l, "r2l");
 
 
   defsymbol (&Ql2r, "l2r");
   defsymbol (&Qr2l, "r2l");
 
-  /* Charsets, compatible with Emacs/Mule 19.33-delta
+  /* Charsets, compatible with FSF 20.3
      Naming convention is Script-Charset[-Edition] */
   defsymbol (&Qascii,                  "ascii");
   defsymbol (&Qcontrol_1,              "control-1");
      Naming convention is Script-Charset[-Edition] */
   defsymbol (&Qascii,                  "ascii");
   defsymbol (&Qcontrol_1,              "control-1");
@@ -1189,232 +1875,1631 @@ syms_of_mule_charset (void)
   defsymbol (&Qlatin_iso8859_2,                "latin-iso8859-2");
   defsymbol (&Qlatin_iso8859_3,                "latin-iso8859-3");
   defsymbol (&Qlatin_iso8859_4,                "latin-iso8859-4");
   defsymbol (&Qlatin_iso8859_2,                "latin-iso8859-2");
   defsymbol (&Qlatin_iso8859_3,                "latin-iso8859-3");
   defsymbol (&Qlatin_iso8859_4,                "latin-iso8859-4");
-  defsymbol (&Qcyrillic_iso8859_5,     "cyrillic-iso8859-5");
-  defsymbol (&Qarabic_iso8859_6,       "arabic-iso8859-6");
+  defsymbol (&Qthai_tis620,            "thai-tis620");
   defsymbol (&Qgreek_iso8859_7,                "greek-iso8859-7");
   defsymbol (&Qgreek_iso8859_7,                "greek-iso8859-7");
+  defsymbol (&Qarabic_iso8859_6,       "arabic-iso8859-6");
   defsymbol (&Qhebrew_iso8859_8,       "hebrew-iso8859-8");
   defsymbol (&Qhebrew_iso8859_8,       "hebrew-iso8859-8");
-  defsymbol (&Qlatin_iso8859_9,                "latin-iso8859-9");
-  defsymbol (&Qthai_tis620,            "thai-tis620");
-
   defsymbol (&Qkatakana_jisx0201,      "katakana-jisx0201");
   defsymbol (&Qlatin_jisx0201,         "latin-jisx0201");
   defsymbol (&Qkatakana_jisx0201,      "katakana-jisx0201");
   defsymbol (&Qlatin_jisx0201,         "latin-jisx0201");
+  defsymbol (&Qcyrillic_iso8859_5,     "cyrillic-iso8859-5");
+  defsymbol (&Qlatin_iso8859_9,                "latin-iso8859-9");
   defsymbol (&Qjapanese_jisx0208_1978, "japanese-jisx0208-1978");
   defsymbol (&Qjapanese_jisx0208_1978, "japanese-jisx0208-1978");
+  defsymbol (&Qchinese_gb2312,         "chinese-gb2312");
   defsymbol (&Qjapanese_jisx0208,      "japanese-jisx0208");
   defsymbol (&Qjapanese_jisx0208,      "japanese-jisx0208");
+  defsymbol (&Qkorean_ksc5601,         "korean-ksc5601");
   defsymbol (&Qjapanese_jisx0212,      "japanese-jisx0212");
   defsymbol (&Qjapanese_jisx0212,      "japanese-jisx0212");
-
-  defsymbol (&Qchinese_gb2312,         "chinese-gb2312");
-  defsymbol (&Qchinese_big5_1,         "chinese-big5-1");
-  defsymbol (&Qchinese_big5_2,         "chinese-big5-2");
   defsymbol (&Qchinese_cns11643_1,     "chinese-cns11643-1");
   defsymbol (&Qchinese_cns11643_2,     "chinese-cns11643-2");
   defsymbol (&Qchinese_cns11643_1,     "chinese-cns11643-1");
   defsymbol (&Qchinese_cns11643_2,     "chinese-cns11643-2");
+#ifdef UTF2000
+  defsymbol (&Qucs_bmp,                        "ucs-bmp");
+  defsymbol (&Qlatin_viscii_lower,     "vietnamese-viscii-lower");
+  defsymbol (&Qlatin_viscii_upper,     "vietnamese-viscii-upper");
+  defsymbol (&Qhiragana_jisx0208,      "hiragana-jisx0208");
+  defsymbol (&Qkatakana_jisx0208,      "katakana-jisx0208");
+#endif
+  defsymbol (&Qchinese_big5_1,         "chinese-big5-1");
+  defsymbol (&Qchinese_big5_2,         "chinese-big5-2");
 
 
-  defsymbol (&Qkorean_ksc5601,         "korean-ksc5601");
   defsymbol (&Qcomposite,              "composite");
 }
 
 void
 vars_of_mule_charset (void)
 {
   defsymbol (&Qcomposite,              "composite");
 }
 
 void
 vars_of_mule_charset (void)
 {
-  int i, j, k;
+  int i, j;
+#ifndef UTF2000
+  int k;
+#endif
 
   /* Table of charsets indexed by leading byte. */
   for (i = 0; i < countof (charset_by_leading_byte); i++)
     charset_by_leading_byte[i] = Qnil;
 
 
   /* Table of charsets indexed by leading byte. */
   for (i = 0; i < countof (charset_by_leading_byte); i++)
     charset_by_leading_byte[i] = Qnil;
 
+#ifdef UTF2000
+  /* Table of charsets indexed by type/final-byte. */
+  for (i = 0; i < countof (charset_by_attributes); i++)
+    for (j = 0; j < countof (charset_by_attributes[0]); j++)
+       charset_by_attributes[i][j] = Qnil;
+#else
   /* Table of charsets indexed by type/final-byte/direction. */
   for (i = 0; i < countof (charset_by_attributes); i++)
     for (j = 0; j < countof (charset_by_attributes[0]); j++)
       for (k = 0; k < countof (charset_by_attributes[0][0]); k++)
        charset_by_attributes[i][j][k] = Qnil;
   /* Table of charsets indexed by type/final-byte/direction. */
   for (i = 0; i < countof (charset_by_attributes); i++)
     for (j = 0; j < countof (charset_by_attributes[0]); j++)
       for (k = 0; k < countof (charset_by_attributes[0][0]); k++)
        charset_by_attributes[i][j][k] = Qnil;
+#endif
 
   next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1;
 
   next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1;
+#ifdef UTF2000
+  next_allocated_2_byte_leading_byte = LEADING_BYTE_CHINESE_BIG5_2 + 1;
+#else
   next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2;
   next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2;
+#endif
+
+#ifndef UTF2000
+  leading_code_private_11 = PRE_LEADING_BYTE_PRIVATE_1;
+  DEFVAR_INT ("leading-code-private-11", &leading_code_private_11 /*
+Leading-code of private TYPE9N charset of column-width 1.
+*/ );
+  leading_code_private_11 = PRE_LEADING_BYTE_PRIVATE_1;
+#endif
+
+#ifdef UTF2000
+  Vutf_2000_version = build_string("0.8 (Kami)");
+  DEFVAR_LISP ("utf-2000-version", &Vutf_2000_version /*
+Version number of UTF-2000.
+*/ );
+
+  Vdefault_coded_charset_priority_list = Qnil;
+  DEFVAR_LISP ("default-coded-charset-priority-list",
+              &Vdefault_coded_charset_priority_list /*
+Default order of preferred coded-character-set.
+*/ );
+#endif
 }
 
 void
 complex_vars_of_mule_charset (void)
 {
 }
 
 void
 complex_vars_of_mule_charset (void)
 {
-  staticpro (&Vcharset_hashtable);
-  Vcharset_hashtable = make_lisp_hashtable (50, HASHTABLE_NONWEAK,
-                                           HASHTABLE_EQ);
+  staticpro (&Vcharset_hash_table);
+  Vcharset_hash_table =
+    make_lisp_hash_table (50, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ);
 
   /* Predefined character sets.  We store them into variables for
      ease of access. */
 
 
   /* Predefined character sets.  We store them into variables for
      ease of access. */
 
+#ifdef UTF2000
+  staticpro (&latin_jisx0201_to_ucs);
+  latin_jisx0201_to_ucs = make_vector (94, Qnil);
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x21 - 33]
+    = make_char (0x0021) /* EXCLAMATION MARK */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x22 - 33]
+    = make_char (0x0022) /* QUOTATION MARK */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x23 - 33]
+    = make_char (0x0023) /* NUMBER SIGN */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x24 - 33]
+    = make_char (0x0024) /* DOLLAR SIGN */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x25 - 33]
+    = make_char (0x0025) /* PERCENT SIGN */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x26 - 33]
+    = make_char (0x0026) /* AMPERSAND */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x27 - 33]
+    = make_char (0x0027) /* APOSTROPHE */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x28 - 33]
+    = make_char (0x0028) /* LEFT PARENTHESIS */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x29 - 33]
+    = make_char (0x0029) /* RIGHT PARENTHESIS */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x2A - 33]
+    = make_char (0x002A) /* ASTERISK */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x2B - 33]
+    = make_char (0x002B) /* PLUS SIGN */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x2C - 33]
+    = make_char (0x002C) /* COMMA */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x2D - 33]
+    = make_char (0x002D) /* HYPHEN-MINUS */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x2E - 33]
+    = make_char (0x002E) /* FULL STOP */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x2F - 33]
+    = make_char (0x002F) /* SOLIDUS */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x30 - 33]
+    = make_char (0x0030) /* DIGIT ZERO */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x31 - 33]
+    = make_char (0x0031) /* DIGIT ONE */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x32 - 33]
+    = make_char (0x0032) /* DIGIT TWO */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x33 - 33]
+    = make_char (0x0033) /* DIGIT THREE */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x34 - 33]
+    = make_char (0x0034) /* DIGIT FOUR */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x35 - 33]
+    = make_char (0x0035) /* DIGIT FIVE */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x36 - 33]
+    = make_char (0x0036) /* DIGIT SIX */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x37 - 33]
+    = make_char (0x0037) /* DIGIT SEVEN */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x38 - 33]
+    = make_char (0x0038) /* DIGIT EIGHT */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x39 - 33]
+    = make_char (0x0039) /* DIGIT NINE */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x3A - 33]
+    = make_char (0x003A) /* COLON */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x3B - 33]
+    = make_char (0x003B) /* SEMICOLON */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x3C - 33]
+    = make_char (0x003C) /* LESS-THAN SIGN */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x3D - 33]
+    = make_char (0x003D) /* EQUALS SIGN */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x3E - 33]
+    = make_char (0x003E) /* GREATER-THAN SIGN */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x3F - 33]
+    = make_char (0x003F) /* QUESTION MARK */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x40 - 33]
+    = make_char (0x0040) /* COMMERCIAL AT */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x41 - 33]
+    = make_char (0x0041) /* LATIN CAPITAL LETTER A */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x42 - 33]
+    = make_char (0x0042) /* LATIN CAPITAL LETTER B */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x43 - 33]
+    = make_char (0x0043) /* LATIN CAPITAL LETTER C */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x44 - 33]
+    = make_char (0x0044) /* LATIN CAPITAL LETTER D */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x45 - 33]
+    = make_char (0x0045) /* LATIN CAPITAL LETTER E */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x46 - 33]
+    = make_char (0x0046) /* LATIN CAPITAL LETTER F */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x47 - 33]
+    = make_char (0x0047) /* LATIN CAPITAL LETTER G */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x48 - 33]
+    = make_char (0x0048) /* LATIN CAPITAL LETTER H */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x49 - 33]
+    = make_char (0x0049) /* LATIN CAPITAL LETTER I */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x4A - 33]
+    = make_char (0x004A) /* LATIN CAPITAL LETTER J */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x4B - 33]
+    = make_char (0x004B) /* LATIN CAPITAL LETTER K */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x4C - 33]
+    = make_char (0x004C) /* LATIN CAPITAL LETTER L */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x4D - 33]
+    = make_char (0x004D) /* LATIN CAPITAL LETTER M */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x4E - 33]
+    = make_char (0x004E) /* LATIN CAPITAL LETTER N */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x4F - 33]
+    = make_char (0x004F) /* LATIN CAPITAL LETTER O */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x50 - 33]
+    = make_char (0x0050) /* LATIN CAPITAL LETTER P */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x51 - 33]
+    = make_char (0x0051) /* LATIN CAPITAL LETTER Q */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x52 - 33]
+    = make_char (0x0052) /* LATIN CAPITAL LETTER R */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x53 - 33]
+    = make_char (0x0053) /* LATIN CAPITAL LETTER S */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x54 - 33]
+    = make_char (0x0054) /* LATIN CAPITAL LETTER T */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x55 - 33]
+    = make_char (0x0055) /* LATIN CAPITAL LETTER U */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x56 - 33]
+    = make_char (0x0056) /* LATIN CAPITAL LETTER V */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x57 - 33]
+    = make_char (0x0057) /* LATIN CAPITAL LETTER W */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x58 - 33]
+    = make_char (0x0058) /* LATIN CAPITAL LETTER X */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x59 - 33]
+    = make_char (0x0059) /* LATIN CAPITAL LETTER Y */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x5A - 33]
+    = make_char (0x005A) /* LATIN CAPITAL LETTER Z */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x5B - 33]
+    = make_char (0x005B) /* LEFT SQUARE BRACKET */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x5C - 33]
+    = make_char (0x00A5) /* YEN SIGN */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x5D - 33]
+    = make_char (0x005D) /* RIGHT SQUARE BRACKET */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x5E - 33]
+    = make_char (0x005E) /* CIRCUMFLEX ACCENT */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x5F - 33]
+    = make_char (0x005F) /* LOW LINE */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x60 - 33]
+    = make_char (0x0060) /* GRAVE ACCENT */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x61 - 33]
+    = make_char (0x0061) /* LATIN SMALL LETTER A */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x62 - 33]
+    = make_char (0x0062) /* LATIN SMALL LETTER B */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x63 - 33]
+    = make_char (0x0063) /* LATIN SMALL LETTER C */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x64 - 33]
+    = make_char (0x0064) /* LATIN SMALL LETTER D */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x65 - 33]
+    = make_char (0x0065) /* LATIN SMALL LETTER E */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x66 - 33]
+    = make_char (0x0066) /* LATIN SMALL LETTER F */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x67 - 33]
+    = make_char (0x0067) /* LATIN SMALL LETTER G */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x68 - 33]
+    = make_char (0x0068) /* LATIN SMALL LETTER H */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x69 - 33]
+    = make_char (0x0069) /* LATIN SMALL LETTER I */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x6A - 33]
+    = make_char (0x006A) /* LATIN SMALL LETTER J */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x6B - 33]
+    = make_char (0x006B) /* LATIN SMALL LETTER K */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x6C - 33]
+    = make_char (0x006C) /* LATIN SMALL LETTER L */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x6D - 33]
+    = make_char (0x006D) /* LATIN SMALL LETTER M */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x6E - 33]
+    = make_char (0x006E) /* LATIN SMALL LETTER N */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x6F - 33]
+    = make_char (0x006F) /* LATIN SMALL LETTER O */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x70 - 33]
+    = make_char (0x0070) /* LATIN SMALL LETTER P */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x71 - 33]
+    = make_char (0x0071) /* LATIN SMALL LETTER Q */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x72 - 33]
+    = make_char (0x0072) /* LATIN SMALL LETTER R */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x73 - 33]
+    = make_char (0x0073) /* LATIN SMALL LETTER S */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x74 - 33]
+    = make_char (0x0074) /* LATIN SMALL LETTER T */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x75 - 33]
+    = make_char (0x0075) /* LATIN SMALL LETTER U */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x76 - 33]
+    = make_char (0x0076) /* LATIN SMALL LETTER V */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x77 - 33]
+    = make_char (0x0077) /* LATIN SMALL LETTER W */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x78 - 33]
+    = make_char (0x0078) /* LATIN SMALL LETTER X */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x79 - 33]
+    = make_char (0x0079) /* LATIN SMALL LETTER Y */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x7A - 33]
+    = make_char (0x007A) /* LATIN SMALL LETTER Z */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x7B - 33]
+    = make_char (0x007B) /* LEFT CURLY BRACKET */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x7C - 33]
+    = make_char (0x007C) /* VERTICAL LINE */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x7D - 33]
+    = make_char (0x007D) /* RIGHT CURLY BRACKET */;
+  XVECTOR_DATA(latin_jisx0201_to_ucs)[0x7E - 33]
+    = make_char (0x203E) /* OVERLINE */;
+  
+  staticpro (&latin_iso8859_2_to_ucs);
+  latin_iso8859_2_to_ucs = make_vector (96, Qnil);
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA0 - 0xA0]
+    = make_char (0x00A0) /* NO-BREAK SPACE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA1 - 0xA0]
+    = make_char (0x0104) /* LATIN CAPITAL LETTER A WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA2 - 0xA0]
+    = make_char (0x02D8) /* BREVE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA3 - 0xA0]
+    = make_char (0x0141) /* LATIN CAPITAL LETTER L WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA4 - 0xA0]
+    = make_char (0x00A4) /* CURRENCY SIGN */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA5 - 0xA0]
+    = make_char (0x013D) /* LATIN CAPITAL LETTER L WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA6 - 0xA0]
+    = make_char (0x015A) /* LATIN CAPITAL LETTER S WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA7 - 0xA0]
+    = make_char (0x00A7) /* SECTION SIGN */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA8 - 0xA0]
+    = make_char (0x00A8) /* DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xA9 - 0xA0]
+    = make_char (0x0160) /* LATIN CAPITAL LETTER S WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xAA - 0xA0]
+    = make_char (0x015E) /* LATIN CAPITAL LETTER S WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xAB - 0xA0]
+    = make_char (0x0164) /* LATIN CAPITAL LETTER T WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xAC - 0xA0]
+    = make_char (0x0179) /* LATIN CAPITAL LETTER Z WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xAD - 0xA0]
+    = make_char (0x00AD) /* SOFT HYPHEN */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xAE - 0xA0]
+    = make_char (0x017D) /* LATIN CAPITAL LETTER Z WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xAF - 0xA0]
+    = make_char (0x017B) /* LATIN CAPITAL LETTER Z WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB0 - 0xA0]
+    = make_char (0x00B0) /* DEGREE SIGN */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB1 - 0xA0]
+    = make_char (0x0105) /* LATIN SMALL LETTER A WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB2 - 0xA0]
+    = make_char (0x02DB) /* OGONEK */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB3 - 0xA0]
+    = make_char (0x0142) /* LATIN SMALL LETTER L WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB4 - 0xA0]
+    = make_char (0x00B4) /* ACUTE ACCENT */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB5 - 0xA0]
+    = make_char (0x013E) /* LATIN SMALL LETTER L WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB6 - 0xA0]
+    = make_char (0x015B) /* LATIN SMALL LETTER S WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB7 - 0xA0]
+    = make_char (0x02C7) /* CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB8 - 0xA0]
+    = make_char (0x00B8) /* CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xB9 - 0xA0]
+    = make_char (0x0161) /* LATIN SMALL LETTER S WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xBA - 0xA0]
+    = make_char (0x015F) /* LATIN SMALL LETTER S WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xBB - 0xA0]
+    = make_char (0x0165) /* LATIN SMALL LETTER T WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xBC - 0xA0]
+    = make_char (0x017A) /* LATIN SMALL LETTER Z WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xBD - 0xA0]
+    = make_char (0x02DD) /* DOUBLE ACUTE ACCENT */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xBE - 0xA0]
+    = make_char (0x017E) /* LATIN SMALL LETTER Z WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xBF - 0xA0]
+    = make_char (0x017C) /* LATIN SMALL LETTER Z WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC0 - 0xA0]
+    = make_char (0x0154) /* LATIN CAPITAL LETTER R WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC1 - 0xA0]
+    = make_char (0x00C1) /* LATIN CAPITAL LETTER A WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC2 - 0xA0]
+    = make_char (0x00C2) /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC3 - 0xA0]
+    = make_char (0x0102) /* LATIN CAPITAL LETTER A WITH BREVE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC4 - 0xA0]
+    = make_char (0x00C4) /* LATIN CAPITAL LETTER A WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC5 - 0xA0]
+    = make_char (0x0139) /* LATIN CAPITAL LETTER L WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC6 - 0xA0]
+    = make_char (0x0106) /* LATIN CAPITAL LETTER C WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC7 - 0xA0]
+    = make_char (0x00C7) /* LATIN CAPITAL LETTER C WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC8 - 0xA0]
+    = make_char (0x010C) /* LATIN CAPITAL LETTER C WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xC9 - 0xA0]
+    = make_char (0x00C9) /* LATIN CAPITAL LETTER E WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xCA - 0xA0]
+    = make_char (0x0118) /* LATIN CAPITAL LETTER E WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xCB - 0xA0]
+    = make_char (0x00CB) /* LATIN CAPITAL LETTER E WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xCC - 0xA0]
+    = make_char (0x011A) /* LATIN CAPITAL LETTER E WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xCD - 0xA0]
+    = make_char (0x00CD) /* LATIN CAPITAL LETTER I WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xCE - 0xA0]
+    = make_char (0x00CE) /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xCF - 0xA0]
+    = make_char (0x010E) /* LATIN CAPITAL LETTER D WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD0 - 0xA0]
+    = make_char (0x0110) /* LATIN CAPITAL LETTER D WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD1 - 0xA0]
+    = make_char (0x0143) /* LATIN CAPITAL LETTER N WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD2 - 0xA0]
+    = make_char (0x0147) /* LATIN CAPITAL LETTER N WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD3 - 0xA0]
+    = make_char (0x00D3) /* LATIN CAPITAL LETTER O WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD4 - 0xA0]
+    = make_char (0x00D4) /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD5 - 0xA0]
+    = make_char (0x0150) /* LATIN CAPITAL LETTER O WITH DOUBLE ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD6 - 0xA0]
+    = make_char (0x00D6) /* LATIN CAPITAL LETTER O WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD7 - 0xA0]
+    = make_char (0x00D7) /* MULTIPLICATION SIGN */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD8 - 0xA0]
+    = make_char (0x0158) /* LATIN CAPITAL LETTER R WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xD9 - 0xA0]
+    = make_char (0x016E) /* LATIN CAPITAL LETTER U WITH RING ABOVE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xDA - 0xA0]
+    = make_char (0x00DA) /* LATIN CAPITAL LETTER U WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xDB - 0xA0]
+    = make_char (0x0170) /* LATIN CAPITAL LETTER U WITH DOUBLE ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xDC - 0xA0]
+    = make_char (0x00DC) /* LATIN CAPITAL LETTER U WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xDD - 0xA0]
+    = make_char (0x00DD) /* LATIN CAPITAL LETTER Y WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xDE - 0xA0]
+    = make_char (0x0162) /* LATIN CAPITAL LETTER T WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xDF - 0xA0]
+    = make_char (0x00DF) /* LATIN SMALL LETTER SHARP S */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE0 - 0xA0]
+    = make_char (0x0155) /* LATIN SMALL LETTER R WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE1 - 0xA0]
+    = make_char (0x00E1) /* LATIN SMALL LETTER A WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE2 - 0xA0]
+    = make_char (0x00E2) /* LATIN SMALL LETTER A WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE3 - 0xA0]
+    = make_char (0x0103) /* LATIN SMALL LETTER A WITH BREVE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE4 - 0xA0]
+    = make_char (0x00E4) /* LATIN SMALL LETTER A WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE5 - 0xA0]
+    = make_char (0x013A) /* LATIN SMALL LETTER L WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE6 - 0xA0]
+    = make_char (0x0107) /* LATIN SMALL LETTER C WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE7 - 0xA0]
+    = make_char (0x00E7) /* LATIN SMALL LETTER C WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE8 - 0xA0]
+    = make_char (0x010D) /* LATIN SMALL LETTER C WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xE9 - 0xA0]
+    = make_char (0x00E9) /* LATIN SMALL LETTER E WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xEA - 0xA0]
+    = make_char (0x0119) /* LATIN SMALL LETTER E WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xEB - 0xA0]
+    = make_char (0x00EB) /* LATIN SMALL LETTER E WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xEC - 0xA0]
+    = make_char (0x011B) /* LATIN SMALL LETTER E WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xED - 0xA0]
+    = make_char (0x00ED) /* LATIN SMALL LETTER I WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xEE - 0xA0]
+    = make_char (0x00EE) /* LATIN SMALL LETTER I WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xEF - 0xA0]
+    = make_char (0x010F) /* LATIN SMALL LETTER D WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF0 - 0xA0]
+    = make_char (0x0111) /* LATIN SMALL LETTER D WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF1 - 0xA0]
+    = make_char (0x0144) /* LATIN SMALL LETTER N WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF2 - 0xA0]
+    = make_char (0x0148) /* LATIN SMALL LETTER N WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF3 - 0xA0]
+    = make_char (0x00F3) /* LATIN SMALL LETTER O WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF4 - 0xA0]
+    = make_char (0x00F4) /* LATIN SMALL LETTER O WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF5 - 0xA0]
+    = make_char (0x0151) /* LATIN SMALL LETTER O WITH DOUBLE ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF6 - 0xA0]
+    = make_char (0x00F6) /* LATIN SMALL LETTER O WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF7 - 0xA0]
+    = make_char (0x00F7) /* DIVISION SIGN */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF8 - 0xA0]
+    = make_char (0x0159) /* LATIN SMALL LETTER R WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xF9 - 0xA0]
+    = make_char (0x016F) /* LATIN SMALL LETTER U WITH RING ABOVE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xFA - 0xA0]
+    = make_char (0x00FA) /* LATIN SMALL LETTER U WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xFB - 0xA0]
+    = make_char (0x0171) /* LATIN SMALL LETTER U WITH DOUBLE ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xFC - 0xA0]
+    = make_char (0x00FC) /* LATIN SMALL LETTER U WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xFD - 0xA0]
+    = make_char (0x00FD) /* LATIN SMALL LETTER Y WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xFE - 0xA0]
+    = make_char (0x0163) /* LATIN SMALL LETTER T WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_2_to_ucs)[0xFF - 0xA0]
+    = make_char (0x02D9) /* DOT ABOVE */;
+  
+  staticpro (&latin_iso8859_3_to_ucs);
+  latin_iso8859_3_to_ucs = make_vector (96, Qnil);
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA0 - 0xA0]
+    = make_char (0x00A0) /* NO-BREAK SPACE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA1 - 0xA0]
+    = make_char (0x0126) /* LATIN CAPITAL LETTER H WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA2 - 0xA0]
+    = make_char (0x02D8) /* BREVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA3 - 0xA0]
+    = make_char (0x00A3) /* POUND SIGN */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA4 - 0xA0]
+    = make_char (0x00A4) /* CURRENCY SIGN */;
+  /* XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA5 - 0xA0]
+     = make_char (CHAR96('C', 0xA5));  */
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA6 - 0xA0]
+    = make_char (0x0124) /* LATIN CAPITAL LETTER H WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA7 - 0xA0]
+    = make_char (0x00A7) /* SECTION SIGN */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA8 - 0xA0]
+    = make_char (0x00A8) /* DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xA9 - 0xA0]
+    = make_char (0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xAA - 0xA0]
+    = make_char (0x015E) /* LATIN CAPITAL LETTER S WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xAB - 0xA0]
+    = make_char (0x011E) /* LATIN CAPITAL LETTER G WITH BREVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xAC - 0xA0]
+    = make_char (0x0134) /* LATIN CAPITAL LETTER J WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xAD - 0xA0]
+    = make_char (0x00AD) /* SOFT HYPHEN */;
+  /* XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xAE - 0xA0]
+     = make_char (CHAR96('C', 0xAE)); */
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xAF - 0xA0]
+    = make_char (0x017B) /* LATIN CAPITAL LETTER Z WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB0 - 0xA0]
+    = make_char (0x00B0) /* DEGREE SIGN */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB1 - 0xA0]
+    = make_char (0x0127) /* LATIN SMALL LETTER H WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB2 - 0xA0]
+    = make_char (0x00B2) /* SUPERSCRIPT TWO */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB3 - 0xA0]
+    = make_char (0x00B3) /* SUPERSCRIPT THREE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB4 - 0xA0]
+    = make_char (0x00B4) /* ACUTE ACCENT */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB5 - 0xA0]
+    = make_char (0x00B5) /* MICRO SIGN */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB6 - 0xA0]
+    = make_char (0x0125) /* LATIN SMALL LETTER H WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB7 - 0xA0]
+    = make_char (0x00B7) /* MIDDLE DOT */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB8 - 0xA0]
+    = make_char (0x00B8) /* CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xB9 - 0xA0]
+    = make_char (0x0131) /* LATIN SMALL LETTER DOTLESS I */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xBA - 0xA0]
+    = make_char (0x015F) /* LATIN SMALL LETTER S WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xBB - 0xA0]
+    = make_char (0x011F) /* LATIN SMALL LETTER G WITH BREVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xBC - 0xA0]
+    = make_char (0x0135) /* LATIN SMALL LETTER J WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xBD - 0xA0]
+    = make_char (0x00BD) /* VULGAR FRACTION ONE HALF */;
+  /* XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xBE - 0xA0]
+     = make_char (CHAR96('C', 0xBE)); */
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xBF - 0xA0]
+    = make_char (0x017C) /* LATIN SMALL LETTER Z WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC0 - 0xA0]
+    = make_char (0x00C0) /* LATIN CAPITAL LETTER A WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC1 - 0xA0]
+    = make_char (0x00C1) /* LATIN CAPITAL LETTER A WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC2 - 0xA0]
+    = make_char (0x00C2) /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */;
+  /* XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC3 - 0xA0]
+     = make_char (CHAR96('C', 0xC3)); */
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC4 - 0xA0]
+    = make_char (0x00C4) /* LATIN CAPITAL LETTER A WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC5 - 0xA0]
+    = make_char (0x010A) /* LATIN CAPITAL LETTER C WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC6 - 0xA0]
+    = make_char (0x0108) /* LATIN CAPITAL LETTER C WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC7 - 0xA0]
+    = make_char (0x00C7) /* LATIN CAPITAL LETTER C WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC8 - 0xA0]
+    = make_char (0x00C8) /* LATIN CAPITAL LETTER E WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xC9 - 0xA0]
+    = make_char (0x00C9) /* LATIN CAPITAL LETTER E WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xCA - 0xA0]
+    = make_char (0x00CA) /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xCB - 0xA0]
+    = make_char (0x00CB) /* LATIN CAPITAL LETTER E WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xCC - 0xA0]
+    = make_char (0x00CC) /* LATIN CAPITAL LETTER I WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xCD - 0xA0]
+    = make_char (0x00CD) /* LATIN CAPITAL LETTER I WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xCE - 0xA0]
+    = make_char (0x00CE) /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xCF - 0xA0]
+    = make_char (0x00CF) /* LATIN CAPITAL LETTER I WITH DIAERESIS */;
+  /* XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD0 - 0xA0]
+     = make_char (CHAR96('C', 0xD0)); */
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD1 - 0xA0]
+    = make_char (0x00D1) /* LATIN CAPITAL LETTER N WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD2 - 0xA0]
+    = make_char (0x00D2) /* LATIN CAPITAL LETTER O WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD3 - 0xA0]
+    = make_char (0x00D3) /* LATIN CAPITAL LETTER O WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD4 - 0xA0]
+    = make_char (0x00D4) /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD5 - 0xA0]
+    = make_char (0x0120) /* LATIN CAPITAL LETTER G WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD6 - 0xA0]
+    = make_char (0x00D6) /* LATIN CAPITAL LETTER O WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD7 - 0xA0]
+    = make_char (0x00D7) /* MULTIPLICATION SIGN */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD8 - 0xA0]
+    = make_char (0x011C) /* LATIN CAPITAL LETTER G WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xD9 - 0xA0]
+    = make_char (0x00D9) /* LATIN CAPITAL LETTER U WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xDA - 0xA0]
+    = make_char (0x00DA) /* LATIN CAPITAL LETTER U WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xDB - 0xA0]
+    = make_char (0x00DB) /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xDC - 0xA0]
+    = make_char (0x00DC) /* LATIN CAPITAL LETTER U WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xDD - 0xA0]
+    = make_char (0x016C) /* LATIN CAPITAL LETTER U WITH BREVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xDE - 0xA0]
+    = make_char (0x015C) /* LATIN CAPITAL LETTER S WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xDF - 0xA0]
+    = make_char (0x00DF) /* LATIN SMALL LETTER SHARP S */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE0 - 0xA0]
+    = make_char (0x00E0) /* LATIN SMALL LETTER A WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE1 - 0xA0]
+    = make_char (0x00E1) /* LATIN SMALL LETTER A WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE2 - 0xA0]
+    = make_char (0x00E2) /* LATIN SMALL LETTER A WITH CIRCUMFLEX */;
+  /* XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE3 - 0xA0]
+     = make_char (CHAR96('C', 0xE3)); */
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE4 - 0xA0]
+    = make_char (0x00E4) /* LATIN SMALL LETTER A WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE5 - 0xA0]
+    = make_char (0x010B) /* LATIN SMALL LETTER C WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE6 - 0xA0]
+    = make_char (0x0109) /* LATIN SMALL LETTER C WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE7 - 0xA0]
+    = make_char (0x00E7) /* LATIN SMALL LETTER C WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE8 - 0xA0]
+    = make_char (0x00E8) /* LATIN SMALL LETTER E WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xE9 - 0xA0]
+    = make_char (0x00E9) /* LATIN SMALL LETTER E WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xEA - 0xA0]
+    = make_char (0x00EA) /* LATIN SMALL LETTER E WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xEB - 0xA0]
+    = make_char (0x00EB) /* LATIN SMALL LETTER E WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xEC - 0xA0]
+    = make_char (0x00EC) /* LATIN SMALL LETTER I WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xED - 0xA0]
+    = make_char (0x00ED) /* LATIN SMALL LETTER I WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xEE - 0xA0]
+    = make_char (0x00EE) /* LATIN SMALL LETTER I WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xEF - 0xA0]
+    = make_char (0x00EF) /* LATIN SMALL LETTER I WITH DIAERESIS */;
+  /* XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF0 - 0xA0]
+     = make_char (CHAR96('C', 0xF0)); */
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF1 - 0xA0]
+    = make_char (0x00F1) /* LATIN SMALL LETTER N WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF2 - 0xA0]
+    = make_char (0x00F2) /* LATIN SMALL LETTER O WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF3 - 0xA0]
+    = make_char (0x00F3) /* LATIN SMALL LETTER O WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF4 - 0xA0]
+    = make_char (0x00F4) /* LATIN SMALL LETTER O WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF5 - 0xA0]
+    = make_char (0x0121) /* LATIN SMALL LETTER G WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF6 - 0xA0]
+    = make_char (0x00F6) /* LATIN SMALL LETTER O WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF7 - 0xA0]
+    = make_char (0x00F7) /* DIVISION SIGN */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF8 - 0xA0]
+    = make_char (0x011D) /* LATIN SMALL LETTER G WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xF9 - 0xA0]
+    = make_char (0x00F9) /* LATIN SMALL LETTER U WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xFA - 0xA0]
+    = make_char (0x00FA) /* LATIN SMALL LETTER U WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xFB - 0xA0]
+    = make_char (0x00FB) /* LATIN SMALL LETTER U WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xFC - 0xA0]
+    = make_char (0x00FC) /* LATIN SMALL LETTER U WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xFD - 0xA0]
+    = make_char (0x016D) /* LATIN SMALL LETTER U WITH BREVE */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xFE - 0xA0]
+    = make_char (0x015D) /* LATIN SMALL LETTER S WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_3_to_ucs)[0xFF - 0xA0]
+    = make_char (0x02D9) /* DOT ABOVE */;
+  
+  staticpro (&latin_iso8859_4_to_ucs);
+  latin_iso8859_4_to_ucs = make_vector (96, Qnil);
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA0 - 0xA0]
+    = make_char (0x00A0) /* NO-BREAK SPACE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA1 - 0xA0]
+    = make_char (0x0104) /* LATIN CAPITAL LETTER A WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA2 - 0xA0]
+    = make_char (0x0138) /* LATIN SMALL LETTER KRA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA3 - 0xA0]
+    = make_char (0x0156) /* LATIN CAPITAL LETTER R WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA4 - 0xA0]
+    = make_char (0x00A4) /* CURRENCY SIGN */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA5 - 0xA0]
+    = make_char (0x0128) /* LATIN CAPITAL LETTER I WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA6 - 0xA0]
+    = make_char (0x013B) /* LATIN CAPITAL LETTER L WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA7 - 0xA0]
+    = make_char (0x00A7) /* SECTION SIGN */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA8 - 0xA0]
+    = make_char (0x00A8) /* DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xA9 - 0xA0]
+    = make_char (0x0160) /* LATIN CAPITAL LETTER S WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xAA - 0xA0]
+    = make_char (0x0112) /* LATIN CAPITAL LETTER E WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xAB - 0xA0]
+    = make_char (0x0122) /* LATIN CAPITAL LETTER G WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xAC - 0xA0]
+    = make_char (0x0166) /* LATIN CAPITAL LETTER T WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xAD - 0xA0]
+    = make_char (0x00AD) /* SOFT HYPHEN */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xAE - 0xA0]
+    = make_char (0x017D) /* LATIN CAPITAL LETTER Z WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xAF - 0xA0]
+    = make_char (0x00AF) /* MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB0 - 0xA0]
+    = make_char (0x00B0) /* DEGREE SIGN */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB1 - 0xA0]
+    = make_char (0x0105) /* LATIN SMALL LETTER A WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB2 - 0xA0]
+    = make_char (0x02DB) /* OGONEK */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB3 - 0xA0]
+    = make_char (0x0157) /* LATIN SMALL LETTER R WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB4 - 0xA0]
+    = make_char (0x00B4) /* ACUTE ACCENT */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB5 - 0xA0]
+    = make_char (0x0129) /* LATIN SMALL LETTER I WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB6 - 0xA0]
+    = make_char (0x013C) /* LATIN SMALL LETTER L WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB7 - 0xA0]
+    = make_char (0x02C7) /* CARON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB8 - 0xA0]
+    = make_char (0x00B8) /* CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xB9 - 0xA0]
+    = make_char (0x0161) /* LATIN SMALL LETTER S WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xBA - 0xA0]
+    = make_char (0x0113) /* LATIN SMALL LETTER E WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xBB - 0xA0]
+    = make_char (0x0123) /* LATIN SMALL LETTER G WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xBC - 0xA0]
+    = make_char (0x0167) /* LATIN SMALL LETTER T WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xBD - 0xA0]
+    = make_char (0x014A) /* LATIN CAPITAL LETTER ENG */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xBE - 0xA0]
+    = make_char (0x017E) /* LATIN SMALL LETTER Z WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xBF - 0xA0]
+    = make_char (0x014B) /* LATIN SMALL LETTER ENG */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC0 - 0xA0]
+    = make_char (0x0100) /* LATIN CAPITAL LETTER A WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC1 - 0xA0]
+    = make_char (0x00C1) /* LATIN CAPITAL LETTER A WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC2 - 0xA0]
+    = make_char (0x00C2) /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC3 - 0xA0]
+    = make_char (0x00C3) /* LATIN CAPITAL LETTER A WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC4 - 0xA0]
+    = make_char (0x00C4) /* LATIN CAPITAL LETTER A WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC5 - 0xA0]
+    = make_char (0x00C5) /* LATIN CAPITAL LETTER A WITH RING ABOVE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC6 - 0xA0]
+    = make_char (0x00C6) /* LATIN CAPITAL LETTER AE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC7 - 0xA0]
+    = make_char (0x012E) /* LATIN CAPITAL LETTER I WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC8 - 0xA0]
+    = make_char (0x010C) /* LATIN CAPITAL LETTER C WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xC9 - 0xA0]
+    = make_char (0x00C9) /* LATIN CAPITAL LETTER E WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xCA - 0xA0]
+    = make_char (0x0118) /* LATIN CAPITAL LETTER E WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xCB - 0xA0]
+    = make_char (0x00CB) /* LATIN CAPITAL LETTER E WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xCC - 0xA0]
+    = make_char (0x0116) /* LATIN CAPITAL LETTER E WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xCD - 0xA0]
+    = make_char (0x00CD) /* LATIN CAPITAL LETTER I WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xCE - 0xA0]
+    = make_char (0x00CE) /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xCF - 0xA0]
+    = make_char (0x012A) /* LATIN CAPITAL LETTER I WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD0 - 0xA0]
+    = make_char (0x0110) /* LATIN CAPITAL LETTER D WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD1 - 0xA0]
+    = make_char (0x0145) /* LATIN CAPITAL LETTER N WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD2 - 0xA0]
+    = make_char (0x014C) /* LATIN CAPITAL LETTER O WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD3 - 0xA0]
+    = make_char (0x0136) /* LATIN CAPITAL LETTER K WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD4 - 0xA0]
+    = make_char (0x00D4) /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD5 - 0xA0]
+    = make_char (0x00D5) /* LATIN CAPITAL LETTER O WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD6 - 0xA0]
+    = make_char (0x00D6) /* LATIN CAPITAL LETTER O WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD7 - 0xA0]
+    = make_char (0x00D7) /* MULTIPLICATION SIGN */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD8 - 0xA0]
+    = make_char (0x00D8) /* LATIN CAPITAL LETTER O WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xD9 - 0xA0]
+    = make_char (0x0172) /* LATIN CAPITAL LETTER U WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xDA - 0xA0]
+    = make_char (0x00DA) /* LATIN CAPITAL LETTER U WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xDB - 0xA0]
+    = make_char (0x00DB) /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xDC - 0xA0]
+    = make_char (0x00DC) /* LATIN CAPITAL LETTER U WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xDD - 0xA0]
+    = make_char (0x0168) /* LATIN CAPITAL LETTER U WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xDE - 0xA0]
+    = make_char (0x016A) /* LATIN CAPITAL LETTER U WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xDF - 0xA0]
+    = make_char (0x00DF) /* LATIN SMALL LETTER SHARP S */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE0 - 0xA0]
+    = make_char (0x0101) /* LATIN SMALL LETTER A WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE1 - 0xA0]
+    = make_char (0x00E1) /* LATIN SMALL LETTER A WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE2 - 0xA0]
+    = make_char (0x00E2) /* LATIN SMALL LETTER A WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE3 - 0xA0]
+    = make_char (0x00E3) /* LATIN SMALL LETTER A WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE4 - 0xA0]
+    = make_char (0x00E4) /* LATIN SMALL LETTER A WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE5 - 0xA0]
+    = make_char (0x00E5) /* LATIN SMALL LETTER A WITH RING ABOVE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE6 - 0xA0]
+    = make_char (0x00E6) /* LATIN SMALL LETTER AE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE7 - 0xA0]
+    = make_char (0x012F) /* LATIN SMALL LETTER I WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE8 - 0xA0]
+    = make_char (0x010D) /* LATIN SMALL LETTER C WITH CARON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xE9 - 0xA0]
+    = make_char (0x00E9) /* LATIN SMALL LETTER E WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xEA - 0xA0]
+    = make_char (0x0119) /* LATIN SMALL LETTER E WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xEB - 0xA0]
+    = make_char (0x00EB) /* LATIN SMALL LETTER E WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xEC - 0xA0]
+    = make_char (0x0117) /* LATIN SMALL LETTER E WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xED - 0xA0]
+    = make_char (0x00ED) /* LATIN SMALL LETTER I WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xEE - 0xA0]
+    = make_char (0x00EE) /* LATIN SMALL LETTER I WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xEF - 0xA0]
+    = make_char (0x012B) /* LATIN SMALL LETTER I WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF0 - 0xA0]
+    = make_char (0x0111) /* LATIN SMALL LETTER D WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF1 - 0xA0]
+    = make_char (0x0146) /* LATIN SMALL LETTER N WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF2 - 0xA0]
+    = make_char (0x014D) /* LATIN SMALL LETTER O WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF3 - 0xA0]
+    = make_char (0x0137) /* LATIN SMALL LETTER K WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF4 - 0xA0]
+    = make_char (0x00F4) /* LATIN SMALL LETTER O WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF5 - 0xA0]
+    = make_char (0x00F5) /* LATIN SMALL LETTER O WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF6 - 0xA0]
+    = make_char (0x00F6) /* LATIN SMALL LETTER O WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF7 - 0xA0]
+    = make_char (0x00F7) /* DIVISION SIGN */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF8 - 0xA0]
+    = make_char (0x00F8) /* LATIN SMALL LETTER O WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xF9 - 0xA0]
+    = make_char (0x0173) /* LATIN SMALL LETTER U WITH OGONEK */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xFA - 0xA0]
+    = make_char (0x00FA) /* LATIN SMALL LETTER U WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xFB - 0xA0]
+    = make_char (0x00FB) /* LATIN SMALL LETTER U WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xFC - 0xA0]
+    = make_char (0x00FC) /* LATIN SMALL LETTER U WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xFD - 0xA0]
+    = make_char (0x0169) /* LATIN SMALL LETTER U WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xFE - 0xA0]
+    = make_char (0x016B) /* LATIN SMALL LETTER U WITH MACRON */;
+  XVECTOR_DATA(latin_iso8859_4_to_ucs)[0xFF - 0xA0]
+    = make_char (0x02D9) /* DOT ABOVE */;
+  
+  staticpro (&latin_iso8859_9_to_ucs);
+  latin_iso8859_9_to_ucs = make_vector (96, Qnil);
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA0 - 0xA0]
+    = make_char (0x00A0) /* NO-BREAK SPACE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA1 - 0xA0]
+    = make_char (0x00A1) /* INVERTED EXCLAMATION MARK */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA2 - 0xA0]
+    = make_char (0x00A2) /* CENT SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA3 - 0xA0]
+    = make_char (0x00A3) /* POUND SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA4 - 0xA0]
+    = make_char (0x00A4) /* CURRENCY SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA5 - 0xA0]
+    = make_char (0x00A5) /* YEN SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA6 - 0xA0]
+    = make_char (0x00A6) /* BROKEN BAR */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA7 - 0xA0]
+    = make_char (0x00A7) /* SECTION SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA8 - 0xA0]
+    = make_char (0x00A8) /* DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xA9 - 0xA0]
+    = make_char (0x00A9) /* COPYRIGHT SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xAA - 0xA0]
+    = make_char (0x00AA) /* FEMININE ORDINAL INDICATOR */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xAB - 0xA0]
+    = make_char (0x00AB) /* LEFT-POINTING DOUBLE ANGLE QUOTATION MARK */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xAC - 0xA0]
+    = make_char (0x00AC) /* NOT SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xAD - 0xA0]
+    = make_char (0x00AD) /* SOFT HYPHEN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xAE - 0xA0]
+    = make_char (0x00AE) /* REGISTERED SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xAF - 0xA0]
+    = make_char (0x00AF) /* MACRON */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB0 - 0xA0]
+    = make_char (0x00B0) /* DEGREE SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB1 - 0xA0]
+    = make_char (0x00B1) /* PLUS-MINUS SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB2 - 0xA0]
+    = make_char (0x00B2) /* SUPERSCRIPT TWO */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB3 - 0xA0]
+    = make_char (0x00B3) /* SUPERSCRIPT THREE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB4 - 0xA0]
+    = make_char (0x00B4) /* ACUTE ACCENT */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB5 - 0xA0]
+    = make_char (0x00B5) /* MICRO SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB6 - 0xA0]
+    = make_char (0x00B6) /* PILCROW SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB7 - 0xA0]
+    = make_char (0x00B7) /* MIDDLE DOT */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB8 - 0xA0]
+    = make_char (0x00B8) /* CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xB9 - 0xA0]
+    = make_char (0x00B9) /* SUPERSCRIPT ONE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xBA - 0xA0]
+    = make_char (0x00BA) /* MASCULINE ORDINAL INDICATOR */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xBB - 0xA0]
+    = make_char (0x00BB) /* RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xBC - 0xA0]
+    = make_char (0x00BC) /* VULGAR FRACTION ONE QUARTER */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xBD - 0xA0]
+    = make_char (0x00BD) /* VULGAR FRACTION ONE HALF */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xBE - 0xA0]
+    = make_char (0x00BE) /* VULGAR FRACTION THREE QUARTERS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xBF - 0xA0]
+    = make_char (0x00BF) /* INVERTED QUESTION MARK */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC0 - 0xA0]
+    = make_char (0x00C0) /* LATIN CAPITAL LETTER A WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC1 - 0xA0]
+    = make_char (0x00C1) /* LATIN CAPITAL LETTER A WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC2 - 0xA0]
+    = make_char (0x00C2) /* LATIN CAPITAL LETTER A WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC3 - 0xA0]
+    = make_char (0x00C3) /* LATIN CAPITAL LETTER A WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC4 - 0xA0]
+    = make_char (0x00C4) /* LATIN CAPITAL LETTER A WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC5 - 0xA0]
+    = make_char (0x00C5) /* LATIN CAPITAL LETTER A WITH RING ABOVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC6 - 0xA0]
+    = make_char (0x00C6) /* LATIN CAPITAL LETTER AE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC7 - 0xA0]
+    = make_char (0x00C7) /* LATIN CAPITAL LETTER C WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC8 - 0xA0]
+    = make_char (0x00C8) /* LATIN CAPITAL LETTER E WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xC9 - 0xA0]
+    = make_char (0x00C9) /* LATIN CAPITAL LETTER E WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xCA - 0xA0]
+    = make_char (0x00CA) /* LATIN CAPITAL LETTER E WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xCB - 0xA0]
+    = make_char (0x00CB) /* LATIN CAPITAL LETTER E WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xCC - 0xA0]
+    = make_char (0x00CC) /* LATIN CAPITAL LETTER I WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xCD - 0xA0]
+    = make_char (0x00CD) /* LATIN CAPITAL LETTER I WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xCE - 0xA0]
+    = make_char (0x00CE) /* LATIN CAPITAL LETTER I WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xCF - 0xA0]
+    = make_char (0x00CF) /* LATIN CAPITAL LETTER I WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD0 - 0xA0]
+    = make_char (0x011E) /* LATIN CAPITAL LETTER G WITH BREVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD1 - 0xA0]
+    = make_char (0x00D1) /* LATIN CAPITAL LETTER N WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD2 - 0xA0]
+    = make_char (0x00D2) /* LATIN CAPITAL LETTER O WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD3 - 0xA0]
+    = make_char (0x00D3) /* LATIN CAPITAL LETTER O WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD4 - 0xA0]
+    = make_char (0x00D4) /* LATIN CAPITAL LETTER O WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD5 - 0xA0]
+    = make_char (0x00D5) /* LATIN CAPITAL LETTER O WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD6 - 0xA0]
+    = make_char (0x00D6) /* LATIN CAPITAL LETTER O WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD7 - 0xA0]
+    = make_char (0x00D7) /* MULTIPLICATION SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD8 - 0xA0]
+    = make_char (0x00D8) /* LATIN CAPITAL LETTER O WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xD9 - 0xA0]
+    = make_char (0x00D9) /* LATIN CAPITAL LETTER U WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xDA - 0xA0]
+    = make_char (0x00DA) /* LATIN CAPITAL LETTER U WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xDB - 0xA0]
+    = make_char (0x00DB) /* LATIN CAPITAL LETTER U WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xDC - 0xA0]
+    = make_char (0x00DC) /* LATIN CAPITAL LETTER U WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xDD - 0xA0]
+    = make_char (0x0130) /* LATIN CAPITAL LETTER I WITH DOT ABOVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xDE - 0xA0]
+    = make_char (0x015E) /* LATIN CAPITAL LETTER S WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xDF - 0xA0]
+    = make_char (0x00DF) /* LATIN SMALL LETTER SHARP S */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE0 - 0xA0]
+    = make_char (0x00E0) /* LATIN SMALL LETTER A WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE1 - 0xA0]
+    = make_char (0x00E1) /* LATIN SMALL LETTER A WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE2 - 0xA0]
+    = make_char (0x00E2) /* LATIN SMALL LETTER A WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE3 - 0xA0]
+    = make_char (0x00E3) /* LATIN SMALL LETTER A WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE4 - 0xA0]
+    = make_char (0x00E4) /* LATIN SMALL LETTER A WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE5 - 0xA0]
+    = make_char (0x00E5) /* LATIN SMALL LETTER A WITH RING ABOVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE6 - 0xA0]
+    = make_char (0x00E6) /* LATIN SMALL LETTER AE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE7 - 0xA0]
+    = make_char (0x00E7) /* LATIN SMALL LETTER C WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE8 - 0xA0]
+    = make_char (0x00E8) /* LATIN SMALL LETTER E WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xE9 - 0xA0]
+    = make_char (0x00E9) /* LATIN SMALL LETTER E WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xEA - 0xA0]
+    = make_char (0x00EA) /* LATIN SMALL LETTER E WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xEB - 0xA0]
+    = make_char (0x00EB) /* LATIN SMALL LETTER E WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xEC - 0xA0]
+    = make_char (0x00EC) /* LATIN SMALL LETTER I WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xED - 0xA0]
+    = make_char (0x00ED) /* LATIN SMALL LETTER I WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xEE - 0xA0]
+    = make_char (0x00EE) /* LATIN SMALL LETTER I WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xEF - 0xA0]
+    = make_char (0x00EF) /* LATIN SMALL LETTER I WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF0 - 0xA0]
+    = make_char (0x011F) /* LATIN SMALL LETTER G WITH BREVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF1 - 0xA0]
+    = make_char (0x00F1) /* LATIN SMALL LETTER N WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF2 - 0xA0]
+    = make_char (0x00F2) /* LATIN SMALL LETTER O WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF3 - 0xA0]
+    = make_char (0x00F3) /* LATIN SMALL LETTER O WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF4 - 0xA0]
+    = make_char (0x00F4) /* LATIN SMALL LETTER O WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF5 - 0xA0]
+    = make_char (0x00F5) /* LATIN SMALL LETTER O WITH TILDE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF6 - 0xA0]
+    = make_char (0x00F6) /* LATIN SMALL LETTER O WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF7 - 0xA0]
+    = make_char (0x00F7) /* DIVISION SIGN */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF8 - 0xA0]
+    = make_char (0x00F8) /* LATIN SMALL LETTER O WITH STROKE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xF9 - 0xA0]
+    = make_char (0x00F9) /* LATIN SMALL LETTER U WITH GRAVE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xFA - 0xA0]
+    = make_char (0x00FA) /* LATIN SMALL LETTER U WITH ACUTE */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xFB - 0xA0]
+    = make_char (0x00FB) /* LATIN SMALL LETTER U WITH CIRCUMFLEX */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xFC - 0xA0]
+    = make_char (0x00FC) /* LATIN SMALL LETTER U WITH DIAERESIS */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xFD - 0xA0]
+    = make_char (0x0131) /* LATIN SMALL LETTER DOTLESS I */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xFE - 0xA0]
+    = make_char (0x015F) /* LATIN SMALL LETTER S WITH CEDILLA */;
+  XVECTOR_DATA(latin_iso8859_9_to_ucs)[0xFF - 0xA0]
+    = make_char (0x00FF) /* LATIN SMALL LETTER Y WITH DIAERESIS */;
+  
+  staticpro (&latin_viscii_lower_to_ucs);
+  latin_viscii_lower_to_ucs = make_vector (96, Qnil);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x20 - 32]
+     = make_char (CHAR96('1', 0x20)); */
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x21 - 32] = make_char (0x1eaf);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x22 - 32] = make_char (0x1eb1);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x23 - 32] = make_char (0x1eb7);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x24 - 32] = make_char (0x1ea5);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x25 - 32] = make_char (0x1ea7);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x26 - 32] = make_char (0x1ea9);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x27 - 32] = make_char (0x1ead);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x28 - 32] = make_char (0x1ebd);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x29 - 32] = make_char (0x1eb9);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x2a - 32] = make_char (0x1ebf);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x2b - 32] = make_char (0x1ec1);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x2c - 32] = make_char (0x1ec3);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x2d - 32] = make_char (0x1ec5);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x2e - 32] = make_char (0x1ec7);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x2f - 32] = make_char (0x1ed1);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x30 - 32] = make_char (0x1ed3);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x31 - 32] = make_char (0x1ed5);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x32 - 32] = make_char (0x1ed7);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x33 - 32]
+     = make_char (CHAR96('1', 0x33)); */
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x34 - 32]
+     = make_char (CHAR96('1', 0x34)); */
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x35 - 32] = make_char (0x1ed9);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x36 - 32] = make_char (0x1edd);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x37 - 32] = make_char (0x1edf);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x38 - 32] = make_char (0x1ecb);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x39 - 32]
+     = make_char (CHAR96('1', 0x39));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x3A - 32]
+     = make_char (CHAR96('1', 0x3A));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x3B - 32]
+     = make_char (CHAR96('1', 0x3B));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x3C - 32]
+     = make_char (CHAR96('1', 0x3C)); */
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x3d - 32] = make_char (0x01a1);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x3e - 32] = make_char (0x1edb);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x3F - 32]
+     = make_char (CHAR96('1', 0x3F));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x40 - 32]
+     = make_char (CHAR96('1', 0x40));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x41 - 32]
+     = make_char (CHAR96('1', 0x41));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x42 - 32]
+     = make_char (CHAR96('1', 0x42));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x43 - 32]
+     = make_char (CHAR96('1', 0x43));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x44 - 32]
+     = make_char (CHAR96('1', 0x44));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x45 - 32]
+     = make_char (CHAR96('1', 0x45)); */
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x46 - 32] = make_char (0x1eb3);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x47 - 32] = make_char (0x1eb5);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x48 - 32]
+     = make_char (CHAR96('1', 0x48));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x49 - 32]
+     = make_char (CHAR96('1', 0x49));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x4A - 32]
+     = make_char (CHAR96('1', 0x4A));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x4B - 32]
+     = make_char (CHAR96('1', 0x4B));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x4C - 32]
+     = make_char (CHAR96('1', 0x4C));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x4D - 32]
+     = make_char (CHAR96('1', 0x4D));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x4E - 32]
+     = make_char (CHAR96('1', 0x4E)); */
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x4f - 32] = make_char (0x1ef3);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x50 - 32]
+     = make_char (CHAR96('1', 0x50)); */
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x51 - 32] = make_char (0x1ee9);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x52 - 32]
+     = make_char (CHAR96('1', 0x52));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x53 - 32]
+     = make_char (CHAR96('1', 0x53));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x54 - 32]
+     = make_char (CHAR96('1', 0x54)); */
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x55 - 32] = make_char (0x1ea1);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x56 - 32] = make_char (0x1ef7);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x57 - 32] = make_char (0x1eeb);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x58 - 32] = make_char (0x1eed);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x59 - 32]
+     = make_char (CHAR96('1', 0x59));
+     XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x5A - 32]
+     = make_char (CHAR96('1', 0x5A)); */
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x5b - 32] = make_char (0x1ef9);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x5c - 32] = make_char (0x1ef5);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x5D - 32]
+     = make_char (CHAR96('1', 0x5D)); */
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x5e - 32] = make_char (0x1ee1);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x5f - 32] = make_char (0x01b0);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x60 - 32] = make_char (0x00e0);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x61 - 32] = make_char (0x00e1);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x62 - 32] = make_char (0x00e2);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x63 - 32] = make_char (0x00e3);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x64 - 32] = make_char (0x1ea3);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x65 - 32] = make_char (0x0103);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x66 - 32] = make_char (0x1eef);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x67 - 32] = make_char (0x1eab);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x68 - 32] = make_char (0x00e8);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x69 - 32] = make_char (0x00e9);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x6a - 32] = make_char (0x00ea);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x6b - 32] = make_char (0x1ebb);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x6c - 32] = make_char (0x00ec);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x6d - 32] = make_char (0x00ed);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x6e - 32] = make_char (0x0129);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x6f - 32] = make_char (0x1ec9);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x70 - 32] = make_char (0x0111);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x71 - 32] = make_char (0x1ef1);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x72 - 32] = make_char (0x00f2);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x73 - 32] = make_char (0x00f3);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x74 - 32] = make_char (0x00f4);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x75 - 32] = make_char (0x00f5);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x76 - 32] = make_char (0x1ecf);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x77 - 32] = make_char (0x1ecd);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x78 - 32] = make_char (0x1ee5);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x79 - 32] = make_char (0x00f9);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x7a - 32] = make_char (0x00fa);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x7b - 32] = make_char (0x0169);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x7c - 32] = make_char (0x1ee7);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x7d - 32] = make_char (0x00fd);
+  XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x7e - 32] = make_char (0x1ee3);
+  /* XVECTOR_DATA(latin_viscii_lower_to_ucs)[0x7F - 32]
+     = make_char (CHAR96('1', 0x7F)); */
+
+  staticpro (&latin_viscii_upper_to_ucs);
+  latin_viscii_upper_to_ucs = make_vector (96, Qnil);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x20 - 32]
+     = make_char (CHAR96('2', 0x20)); */
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x21 - 32] = make_char (0x1eae);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x22 - 32] = make_char (0x1eb0);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x23 - 32] = make_char (0x1eb6);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x24 - 32] = make_char (0x1ea4);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x25 - 32] = make_char (0x1ea6);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x26 - 32] = make_char (0x1ea8);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x27 - 32] = make_char (0x1eac);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x28 - 32] = make_char (0x1ebc);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x29 - 32] = make_char (0x1eb8);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x2a - 32] = make_char (0x1ebe);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x2b - 32] = make_char (0x1ec0);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x2c - 32] = make_char (0x1ec2);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x2d - 32] = make_char (0x1ec4);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x2e - 32] = make_char (0x1ec6);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x2f - 32] = make_char (0x1ed0);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x30 - 32] = make_char (0x1ed2);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x31 - 32] = make_char (0x1ed4);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x32 - 32] = make_char (0x1ed6);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x33 - 32]
+     = make_char (CHAR96('2', 0x33)); */
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x34 - 32]
+     = make_char (CHAR96('2', 0x34)); */
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x35 - 32] = make_char (0x1ed8);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x36 - 32] = make_char (0x1edc);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x37 - 32] = make_char (0x1ede);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x38 - 32] = make_char (0x1eca);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x39 - 32]
+     = make_char (CHAR96('2', 0x39));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x3a - 32]
+     = make_char (CHAR96('2', 0x3a));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x3b - 32]
+     = make_char (CHAR96('2', 0x3b));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x3c - 32]
+     = make_char (CHAR96('2', 0x3c)); */
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x3d - 32] = make_char (0x01a0);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x3e - 32] = make_char (0x1eda);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x3f - 32]
+     = make_char (CHAR96('2', 0x3f));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x40 - 32]
+     = make_char (CHAR96('2', 0x40));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x41 - 32]
+     = make_char (CHAR96('2', 0x41));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x42 - 32]
+     = make_char (CHAR96('2', 0x42));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x43 - 32]
+     = make_char (CHAR96('2', 0x43));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x44 - 32]
+     = make_char (CHAR96('2', 0x44));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x45 - 32]
+     = make_char (CHAR96('2', 0x45)); */
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x46 - 32] = make_char (0x1eb2);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x47 - 32] = make_char (0x1eb4);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x48 - 32]
+     = make_char (CHAR96('2', 0x48));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x49 - 32]
+     = make_char (CHAR96('2', 0x49));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x4a - 32]
+     = make_char (CHAR96('2', 0x4a));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x4b - 32]
+     = make_char (CHAR96('2', 0x4b));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x4c - 32]
+     = make_char (CHAR96('2', 0x4c));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x4d - 32]
+     = make_char (CHAR96('2', 0x4d));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x4e - 32]
+     = make_char (CHAR96('2', 0x4e)); */
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x4f - 32] = make_char (0x1ef2);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x50 - 32]
+     = make_char (CHAR96('2', 0x50)); */
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x51 - 32] = make_char (0x1ee8);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x52 - 32]
+     = make_char (CHAR96('2', 0x52));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x53 - 32]
+     = make_char (CHAR96('2', 0x53));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x54 - 32]
+     = make_char (CHAR96('2', 0x54)); */
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x55 - 32] = make_char (0x1ea0);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x56 - 32] = make_char (0x1ef6);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x57 - 32] = make_char (0x1eea);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x58 - 32] = make_char (0x1eec);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x59 - 32]
+     = make_char (CHAR96('2', 0x59));
+     XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x5a - 32]
+     = make_char (CHAR96('2', 0x5a)); */
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x5b - 32] = make_char (0x1ef8);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x5c - 32] = make_char (0x1ef4);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x5d - 32]
+     = make_char (CHAR96('2', 0x5d)); */
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x5e - 32] = make_char (0x1ee0);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x5f - 32] = make_char (0x01af);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x60 - 32] = make_char (0x00c0);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x61 - 32] = make_char (0x00c1);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x62 - 32] = make_char (0x00c2);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x63 - 32] = make_char (0x00c3);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x64 - 32] = make_char (0x1ea2);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x65 - 32] = make_char (0x0102);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x66 - 32] = make_char (0x1eee);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x67 - 32] = make_char (0x1eaa);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x68 - 32] = make_char (0x00c8);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x69 - 32] = make_char (0x00c9);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x6a - 32] = make_char (0x00ca);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x6b - 32] = make_char (0x1eba);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x6c - 32] = make_char (0x00cc);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x6d - 32] = make_char (0x00cd);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x6e - 32] = make_char (0x0128);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x6f - 32] = make_char (0x1ec8);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x70 - 32] = make_char (0x0110);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x71 - 32] = make_char (0x1ef0);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x72 - 32] = make_char (0x00d2);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x73 - 32] = make_char (0x00d3);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x74 - 32] = make_char (0x00d4);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x75 - 32] = make_char (0x00d5);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x76 - 32] = make_char (0x1ece);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x77 - 32] = make_char (0x1ecc);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x78 - 32] = make_char (0x1ee4);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x79 - 32] = make_char (0x00d9);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x7a - 32] = make_char (0x00da);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x7b - 32] = make_char (0x0168);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x7c - 32] = make_char (0x1ee6);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x7d - 32] = make_char (0x00dd);
+  XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x7e - 32] = make_char (0x1ee2);
+  /* XVECTOR_DATA(latin_viscii_upper_to_ucs)[0x7f - 32]
+     = make_char (CHAR96('2', 0x7f)); */
+
+  Vcharset_ucs_bmp =
+    make_charset (LEADING_BYTE_UCS_BMP, Qucs_bmp,
+                 CHARSET_TYPE_256X256, 1, 0, 0,
+                 CHARSET_LEFT_TO_RIGHT,
+                 build_string ("BMP"),
+                 build_string ("BMP"),
+                 build_string ("BMP"),
+                 build_string (""),
+                 Qnil, 0, 0xFFFF, 0, 0);
+#else
+# define latin_iso8859_2_to_ucs NULL
+# define latin_iso8859_3_to_ucs NULL
+# define latin_iso8859_4_to_ucs NULL
+# define latin_iso8859_9_to_ucs NULL
+# define latin_jisx0201_to_ucs NULL
+# define MIN_CHAR_THAI 0
+# define MAX_CHAR_THAI 0
+# define MIN_CHAR_GREEK 0
+# define MAX_CHAR_GREEK 0
+# define MIN_CHAR_HEBREW 0
+# define MAX_CHAR_HEBREW 0
+# define MIN_CHAR_HALFWIDTH_KATAKANA 0
+# define MAX_CHAR_HALFWIDTH_KATAKANA 0
+# define MIN_CHAR_CYRILLIC 0
+# define MAX_CHAR_CYRILLIC 0
+#endif
   Vcharset_ascii =
   Vcharset_ascii =
-    make_charset (0, Qascii, LEADING_BYTE_ASCII, 1,
+    make_charset (LEADING_BYTE_ASCII, Qascii,
                  CHARSET_TYPE_94, 1, 0, 'B',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94, 1, 0, 'B',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("ASCII (ISO 646 IRV)"),
-                 build_string ("iso8859-1"));
+                 build_string ("ASCII"),
+                 build_string ("ASCII)"),
+                 build_string ("ASCII (ISO646 IRV)"),
+                 build_string ("\\(iso8859-[0-9]*\\|-ascii\\)"),
+                 Qnil, 0, 0x7F, 0, 0);
   Vcharset_control_1 =
   Vcharset_control_1 =
-    make_charset (-1, Qcontrol_1, LEADING_BYTE_CONTROL_1, 2,
+    make_charset (LEADING_BYTE_CONTROL_1, Qcontrol_1,
                  CHARSET_TYPE_94, 1, 1, 0,
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94, 1, 1, 0,
                  CHARSET_LEFT_TO_RIGHT,
+                 build_string ("C1"),
                  build_string ("Control characters"),
                  build_string ("Control characters"),
-                 build_string (""));
+                 build_string ("Control characters 128-191"),
+                 build_string (""),
+                 Qnil, 0x80, 0x9F, 0, 0);
   Vcharset_latin_iso8859_1 =
   Vcharset_latin_iso8859_1 =
-    make_charset (129, Qlatin_iso8859_1, LEADING_BYTE_LATIN_ISO8859_1, 2,
+    make_charset (LEADING_BYTE_LATIN_ISO8859_1, Qlatin_iso8859_1,
                  CHARSET_TYPE_96, 1, 1, 'A',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_96, 1, 1, 'A',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("ISO 8859-1 (Latin-1)"),
-                 build_string ("iso8859-1"));
+                 build_string ("Latin-1"),
+                 build_string ("ISO8859-1 (Latin-1)"),
+                 build_string ("ISO8859-1 (Latin-1)"),
+                 build_string ("iso8859-1"),
+                 Qnil, 0xA0, 0xFF, 0, 32);
   Vcharset_latin_iso8859_2 =
   Vcharset_latin_iso8859_2 =
-    make_charset (130, Qlatin_iso8859_2, LEADING_BYTE_LATIN_ISO8859_2, 2,
+    make_charset (LEADING_BYTE_LATIN_ISO8859_2, Qlatin_iso8859_2,
                  CHARSET_TYPE_96, 1, 1, 'B',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_96, 1, 1, 'B',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("ISO 8859-2 (Latin-2)"),
-                 build_string ("iso8859-2"));
+                 build_string ("Latin-2"),
+                 build_string ("ISO8859-2 (Latin-2)"),
+                 build_string ("ISO8859-2 (Latin-2)"),
+                 build_string ("iso8859-2"),
+                 latin_iso8859_2_to_ucs, 0, 0, 0, 32);
   Vcharset_latin_iso8859_3 =
   Vcharset_latin_iso8859_3 =
-    make_charset (131, Qlatin_iso8859_3, LEADING_BYTE_LATIN_ISO8859_3, 2,
+    make_charset (LEADING_BYTE_LATIN_ISO8859_3, Qlatin_iso8859_3,
                  CHARSET_TYPE_96, 1, 1, 'C',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_96, 1, 1, 'C',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("ISO 8859-3 (Latin-3)"),
-                 build_string ("iso8859-3"));
+                 build_string ("Latin-3"),
+                 build_string ("ISO8859-3 (Latin-3)"),
+                 build_string ("ISO8859-3 (Latin-3)"),
+                 build_string ("iso8859-3"),
+                 latin_iso8859_3_to_ucs, 0, 0, 0, 32);
   Vcharset_latin_iso8859_4 =
   Vcharset_latin_iso8859_4 =
-    make_charset (132, Qlatin_iso8859_4, LEADING_BYTE_LATIN_ISO8859_4, 2,
+    make_charset (LEADING_BYTE_LATIN_ISO8859_4, Qlatin_iso8859_4,
                  CHARSET_TYPE_96, 1, 1, 'D',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_96, 1, 1, 'D',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("ISO 8859-4 (Latin-4)"),
-                 build_string ("iso8859-4"));
-  Vcharset_cyrillic_iso8859_5 =
-    make_charset (140, Qcyrillic_iso8859_5, LEADING_BYTE_CYRILLIC_ISO8859_5, 2,
-                 CHARSET_TYPE_96, 1, 1, 'L',
+                 build_string ("Latin-4"),
+                 build_string ("ISO8859-4 (Latin-4)"),
+                 build_string ("ISO8859-4 (Latin-4)"),
+                 build_string ("iso8859-4"),
+                 latin_iso8859_4_to_ucs, 0, 0, 0, 32);
+  Vcharset_thai_tis620 =
+    make_charset (LEADING_BYTE_THAI_TIS620, Qthai_tis620,
+                 CHARSET_TYPE_96, 1, 1, 'T',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("ISO 8859-5 (Cyrillic)"),
-                 build_string ("iso8859-5"));
-  Vcharset_arabic_iso8859_6 =
-    make_charset (135, Qarabic_iso8859_6, LEADING_BYTE_ARABIC_ISO8859_6, 2,
-                 CHARSET_TYPE_96, 1, 1, 'G',
-                 CHARSET_RIGHT_TO_LEFT,
-                 build_string ("ISO 8859-6 (Arabic)"),
-                 build_string ("iso8859-6"));
+                 build_string ("TIS620"),
+                 build_string ("TIS620 (Thai)"),
+                 build_string ("TIS620.2529 (Thai)"),
+                 build_string ("tis620"),
+                 Qnil, MIN_CHAR_THAI, MAX_CHAR_THAI, 0, 32);
   Vcharset_greek_iso8859_7 =
   Vcharset_greek_iso8859_7 =
-    make_charset (134, Qgreek_iso8859_7, LEADING_BYTE_GREEK_ISO8859_7, 2,
+    make_charset (LEADING_BYTE_GREEK_ISO8859_7, Qgreek_iso8859_7,
                  CHARSET_TYPE_96, 1, 1, 'F',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_96, 1, 1, 'F',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("ISO 8859-7 (Greek)"),
-                 build_string ("iso8859-7"));
+                 build_string ("ISO8859-7"),
+                 build_string ("ISO8859-7 (Greek)"),
+                 build_string ("ISO8859-7 (Greek)"),
+                 build_string ("iso8859-7"),
+                 Qnil, MIN_CHAR_GREEK, MAX_CHAR_GREEK, 0, 32);
+  Vcharset_arabic_iso8859_6 =
+    make_charset (LEADING_BYTE_ARABIC_ISO8859_6, Qarabic_iso8859_6,
+                 CHARSET_TYPE_96, 1, 1, 'G',
+                 CHARSET_RIGHT_TO_LEFT,
+                 build_string ("ISO8859-6"),
+                 build_string ("ISO8859-6 (Arabic)"),
+                 build_string ("ISO8859-6 (Arabic)"),
+                 build_string ("iso8859-6"),
+                 Qnil, 0, 0, 0, 32);
   Vcharset_hebrew_iso8859_8 =
   Vcharset_hebrew_iso8859_8 =
-    make_charset (136, Qhebrew_iso8859_8, LEADING_BYTE_HEBREW_ISO8859_8, 2,
+    make_charset (LEADING_BYTE_HEBREW_ISO8859_8, Qhebrew_iso8859_8,
                  CHARSET_TYPE_96, 1, 1, 'H',
                  CHARSET_RIGHT_TO_LEFT,
                  CHARSET_TYPE_96, 1, 1, 'H',
                  CHARSET_RIGHT_TO_LEFT,
-                 build_string ("ISO 8859-8 (Hebrew)"),
-                 build_string ("iso8859-8"));
-  Vcharset_latin_iso8859_9 =
-    make_charset (141, Qlatin_iso8859_9, LEADING_BYTE_LATIN_ISO8859_9, 2,
-                 CHARSET_TYPE_96, 1, 1, 'M',
-                 CHARSET_LEFT_TO_RIGHT,
-                 build_string ("ISO 8859-9 (Latin-5)"),
-                 build_string ("iso8859-9"));
-  Vcharset_thai_tis620 =
-    make_charset (133, Qthai_tis620, LEADING_BYTE_THAI_TIS620, 2,
-                 CHARSET_TYPE_96, 1, 1, 'T',
-                 CHARSET_LEFT_TO_RIGHT,
-                 build_string ("TIS 620.2529 (Thai)"),
-                 build_string ("tis620"));
-
-  /* Japanese */
+                 build_string ("ISO8859-8"),
+                 build_string ("ISO8859-8 (Hebrew)"),
+                 build_string ("ISO8859-8 (Hebrew)"),
+                 build_string ("iso8859-8"),
+                 Qnil, MIN_CHAR_HEBREW, MAX_CHAR_HEBREW, 0, 32);
   Vcharset_katakana_jisx0201 =
   Vcharset_katakana_jisx0201 =
-    make_charset (137, Qkatakana_jisx0201,
-                 LEADING_BYTE_KATAKANA_JISX0201, 2,
+    make_charset (LEADING_BYTE_KATAKANA_JISX0201, Qkatakana_jisx0201,
                  CHARSET_TYPE_94, 1, 1, 'I',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94, 1, 1, 'I',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("JIS X0201-Katakana"),
-                 build_string ("jisx0201.1976"));
+                 build_string ("JISX0201 Kana"),
+                 build_string ("JISX0201.1976 (Japanese Kana)"),
+                 build_string ("JISX0201.1976 Japanese Kana"),
+                 build_string ("jisx0201\\.1976"),
+                 Qnil,
+                 MIN_CHAR_HALFWIDTH_KATAKANA,
+                 MAX_CHAR_HALFWIDTH_KATAKANA, 0, 33);
   Vcharset_latin_jisx0201 =
   Vcharset_latin_jisx0201 =
-    make_charset (138, Qlatin_jisx0201,
-                 LEADING_BYTE_LATIN_JISX0201, 2,
+    make_charset (LEADING_BYTE_LATIN_JISX0201, Qlatin_jisx0201,
                  CHARSET_TYPE_94, 1, 0, 'J',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94, 1, 0, 'J',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("JIS X0201-Latin"),
-                 build_string ("jisx0201.1976"));
+                 build_string ("JISX0201 Roman"),
+                 build_string ("JISX0201.1976 (Japanese Roman)"),
+                 build_string ("JISX0201.1976 Japanese Roman"),
+                 build_string ("jisx0201\\.1976"),
+                 latin_jisx0201_to_ucs, 0, 0, 0, 33);
+  Vcharset_cyrillic_iso8859_5 =
+    make_charset (LEADING_BYTE_CYRILLIC_ISO8859_5, Qcyrillic_iso8859_5,
+                 CHARSET_TYPE_96, 1, 1, 'L',
+                 CHARSET_LEFT_TO_RIGHT,
+                 build_string ("ISO8859-5"),
+                 build_string ("ISO8859-5 (Cyrillic)"),
+                 build_string ("ISO8859-5 (Cyrillic)"),
+                 build_string ("iso8859-5"),
+                 Qnil, MIN_CHAR_CYRILLIC, MAX_CHAR_CYRILLIC, 0, 32);
+  Vcharset_latin_iso8859_9 =
+    make_charset (LEADING_BYTE_LATIN_ISO8859_9, Qlatin_iso8859_9,
+                 CHARSET_TYPE_96, 1, 1, 'M',
+                 CHARSET_LEFT_TO_RIGHT,
+                 build_string ("Latin-5"),
+                 build_string ("ISO8859-9 (Latin-5)"),
+                 build_string ("ISO8859-9 (Latin-5)"),
+                 build_string ("iso8859-9"),
+                 latin_iso8859_9_to_ucs, 0, 0, 0, 32);
   Vcharset_japanese_jisx0208_1978 =
   Vcharset_japanese_jisx0208_1978 =
-    make_charset (144, Qjapanese_jisx0208_1978,
-                 LEADING_BYTE_JAPANESE_JISX0208_1978, 3,
+    make_charset (LEADING_BYTE_JAPANESE_JISX0208_1978, Qjapanese_jisx0208_1978,
                  CHARSET_TYPE_94X94, 2, 0, '@',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94X94, 2, 0, '@',
                  CHARSET_LEFT_TO_RIGHT,
+                 build_string ("JIS X0208:1978"),
+                 build_string ("JIS X0208:1978 (Japanese)"),
                  build_string
                  build_string
-                 ("JIS X0208-1978 (Japanese Kanji; Old Version)"),
-                 build_string ("\\(jisx0208\\|jisc6226\\).19"));
+                 ("JIS X0208:1978 Japanese Kanji (so called \"old JIS\")"),
+                 build_string ("\\(jisx0208\\|jisc6226\\)\\.1978"),
+                 Qnil, 0, 0, 0, 33);
+  Vcharset_chinese_gb2312 =
+    make_charset (LEADING_BYTE_CHINESE_GB2312, Qchinese_gb2312,
+                 CHARSET_TYPE_94X94, 2, 0, 'A',
+                 CHARSET_LEFT_TO_RIGHT,
+                 build_string ("GB2312"),
+                 build_string ("GB2312)"),
+                 build_string ("GB2312 Chinese simplified"),
+                 build_string ("gb2312"),
+                 Qnil, 0, 0, 0, 33);
   Vcharset_japanese_jisx0208 =
   Vcharset_japanese_jisx0208 =
-    make_charset (146, Qjapanese_jisx0208,
-                 LEADING_BYTE_JAPANESE_JISX0208, 3,
+    make_charset (LEADING_BYTE_JAPANESE_JISX0208, Qjapanese_jisx0208,
                  CHARSET_TYPE_94X94, 2, 0, 'B',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94X94, 2, 0, 'B',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("JIS X0208-1983 (Japanese Kanji)"),
-                 build_string ("jisx0208.19\\(83\\|90\\)"));
+                 build_string ("JISX0208"),
+                 build_string ("JIS X0208:1983 (Japanese)"),
+                 build_string ("JIS X0208:1983 Japanese Kanji"),
+                 build_string ("jisx0208\\.1983"),
+                 Qnil, 0, 0, 0, 33);
+  Vcharset_korean_ksc5601 =
+    make_charset (LEADING_BYTE_KOREAN_KSC5601, Qkorean_ksc5601,
+                 CHARSET_TYPE_94X94, 2, 0, 'C',
+                 CHARSET_LEFT_TO_RIGHT,
+                 build_string ("KSC5601"),
+                 build_string ("KSC5601 (Korean"),
+                 build_string ("KSC5601 Korean Hangul and Hanja"),
+                 build_string ("ksc5601"),
+                 Qnil, 0, 0, 0, 33);
   Vcharset_japanese_jisx0212 =
   Vcharset_japanese_jisx0212 =
-    make_charset (148, Qjapanese_jisx0212,
-                 LEADING_BYTE_JAPANESE_JISX0212, 3,
+    make_charset (LEADING_BYTE_JAPANESE_JISX0212, Qjapanese_jisx0212,
                  CHARSET_TYPE_94X94, 2, 0, 'D',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94X94, 2, 0, 'D',
                  CHARSET_LEFT_TO_RIGHT,
-                 build_string ("JIS X0212 (Japanese Supplement)"),
-                 build_string ("jisx0212"));
+                 build_string ("JISX0212"),
+                 build_string ("JISX0212 (Japanese)"),
+                 build_string ("JISX0212 Japanese Supplement"),
+                 build_string ("jisx0212"),
+                 Qnil, 0, 0, 0, 33);
 
 
-  /* Chinese */
-  Vcharset_chinese_gb2312 =
-    make_charset (145, Qchinese_gb2312, LEADING_BYTE_CHINESE_GB2312, 3,
-                 CHARSET_TYPE_94X94, 2, 0, 'A',
-                 CHARSET_LEFT_TO_RIGHT,
-                 build_string ("GB 2312 (Simplified Chinese)"),
-                 build_string ("gb2312"));
 #define CHINESE_CNS_PLANE_RE(n) "cns11643[.-]\\(.*[.-]\\)?" n "$"
   Vcharset_chinese_cns11643_1 =
 #define CHINESE_CNS_PLANE_RE(n) "cns11643[.-]\\(.*[.-]\\)?" n "$"
   Vcharset_chinese_cns11643_1 =
-    make_charset (149, Qchinese_cns11643_1,
-                 LEADING_BYTE_CHINESE_CNS11643_1, 3,
+    make_charset (LEADING_BYTE_CHINESE_CNS11643_1, Qchinese_cns11643_1,
                  CHARSET_TYPE_94X94, 2, 0, 'G',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94X94, 2, 0, 'G',
                  CHARSET_LEFT_TO_RIGHT,
+                 build_string ("CNS11643-1"),
+                 build_string ("CNS11643-1 (Chinese traditional)"),
                  build_string
                  build_string
-                 ("CNS 11643 Plane 1 (Traditional Chinese for daily use)"),
-                 build_string (CHINESE_CNS_PLANE_RE("1")));
+                 ("CNS 11643 Plane 1 Chinese traditional"),
+                 build_string (CHINESE_CNS_PLANE_RE("1")),
+                 Qnil, 0, 0, 0, 33);
   Vcharset_chinese_cns11643_2 =
   Vcharset_chinese_cns11643_2 =
-    make_charset (150, Qchinese_cns11643_2,
-                 LEADING_BYTE_CHINESE_CNS11643_2, 3,
+    make_charset (LEADING_BYTE_CHINESE_CNS11643_2, Qchinese_cns11643_2,
                  CHARSET_TYPE_94X94, 2, 0, 'H',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94X94, 2, 0, 'H',
                  CHARSET_LEFT_TO_RIGHT,
+                 build_string ("CNS11643-2"),
+                 build_string ("CNS11643-2 (Chinese traditional)"),
                  build_string
                  build_string
-                 ("CNS 11643 Plane 2 (Traditional Chinese for daily use)"),
-                 build_string (CHINESE_CNS_PLANE_RE("2")));
+                 ("CNS 11643 Plane 2 Chinese traditional"),
+                 build_string (CHINESE_CNS_PLANE_RE("2")),
+                 Qnil, 0, 0, 0, 33);
+#ifdef UTF2000
+  Vcharset_latin_viscii_lower =
+    make_charset (LEADING_BYTE_LATIN_VISCII_LOWER, Qlatin_viscii_lower,
+                 CHARSET_TYPE_96, 1, 1, '1',
+                 CHARSET_LEFT_TO_RIGHT,
+                 build_string ("VISCII lower"),
+                 build_string ("VISCII lower (Vietnamese)"),
+                 build_string ("VISCII lower (Vietnamese)"),
+                 build_string ("VISCII1\\.1"),
+                 latin_viscii_lower_to_ucs, 0, 0, 0, 32);
+  Vcharset_latin_viscii_upper =
+    make_charset (LEADING_BYTE_LATIN_VISCII_UPPER, Qlatin_viscii_upper,
+                 CHARSET_TYPE_96, 1, 1, '2',
+                 CHARSET_LEFT_TO_RIGHT,
+                 build_string ("VISCII upper"),
+                 build_string ("VISCII upper (Vietnamese)"),
+                 build_string ("VISCII upper (Vietnamese)"),
+                 build_string ("VISCII1\\.1"),
+                 latin_viscii_upper_to_ucs, 0, 0, 0, 32);
+  Vcharset_hiragana_jisx0208 =
+    make_charset (LEADING_BYTE_HIRAGANA_JISX0208, Qhiragana_jisx0208,
+                 CHARSET_TYPE_94X94, 2, 0, 'B',
+                 CHARSET_LEFT_TO_RIGHT,
+                 build_string ("Hiragana"),
+                 build_string ("Hiragana of JIS X0208"),
+                 build_string ("Japanese Hiragana of JIS X0208"),
+                 build_string ("jisx0208\\.19\\(78\\|83\\|90\\)"),
+                 Qnil, MIN_CHAR_HIRAGANA, MAX_CHAR_HIRAGANA,
+                 (0x24 - 33) * 94 + (0x21 - 33), 33);
+  Vcharset_katakana_jisx0208 =
+    make_charset (LEADING_BYTE_KATAKANA_JISX0208, Qkatakana_jisx0208,
+                 CHARSET_TYPE_94X94, 2, 0, 'B',
+                 CHARSET_LEFT_TO_RIGHT,
+                 build_string ("Katakana"),
+                 build_string ("Katakana of JIS X0208"),
+                 build_string ("Japanese Katakana of JIS X0208"),
+                 build_string ("jisx0208\\.19\\(78\\|83\\|90\\)"),
+                 Qnil, MIN_CHAR_KATAKANA, MAX_CHAR_KATAKANA,
+                 (0x25 - 33) * 94 + (0x21 - 33), 33);
+#endif
   Vcharset_chinese_big5_1 =
   Vcharset_chinese_big5_1 =
-    make_charset (152, Qchinese_big5_1, LEADING_BYTE_CHINESE_BIG5_1, 3,
+    make_charset (LEADING_BYTE_CHINESE_BIG5_1, Qchinese_big5_1,
                  CHARSET_TYPE_94X94, 2, 0, '0',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94X94, 2, 0, '0',
                  CHARSET_LEFT_TO_RIGHT,
+                 build_string ("Big5"),
+                 build_string ("Big5 (Level-1)"),
                  build_string
                  build_string
-                 ("Big5 Level 1 (Traditional Chinese for daily use)"),
-                 build_string ("big5"));
+                 ("Big5 Level-1 Chinese traditional"),
+                 build_string ("big5"),
+                 Qnil, 0, 0, 0, 33);
   Vcharset_chinese_big5_2 =
   Vcharset_chinese_big5_2 =
-    make_charset (153, Qchinese_big5_2, LEADING_BYTE_CHINESE_BIG5_2, 3,
+    make_charset (LEADING_BYTE_CHINESE_BIG5_2, Qchinese_big5_2,
                  CHARSET_TYPE_94X94, 2, 0, '1',
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_94X94, 2, 0, '1',
                  CHARSET_LEFT_TO_RIGHT,
+                 build_string ("Big5"),
+                 build_string ("Big5 (Level-2)"),
                  build_string
                  build_string
-                 ("Big5 Level 2 (Traditional Chinese for daily use)"),
-                 build_string ("big5"));
+                 ("Big5 Level-2 Chinese traditional"),
+                 build_string ("big5"),
+                 Qnil, 0, 0, 0, 33);
 
 
-  Vcharset_korean_ksc5601 =
-    make_charset (147, Qkorean_ksc5601, LEADING_BYTE_KOREAN_KSC5601, 3,
-                 CHARSET_TYPE_94X94, 2, 0, 'C',
-                 CHARSET_LEFT_TO_RIGHT,
-                 build_string ("KS C5601 (Hangul and Korean Hanja)"),
-                 build_string ("ksc5601"));
+#ifdef ENABLE_COMPOSITE_CHARS
   /* #### For simplicity, we put composite chars into a 96x96 charset.
      This is going to lead to problems because you can run out of
      room, esp. as we don't yet recycle numbers. */
   Vcharset_composite =
   /* #### For simplicity, we put composite chars into a 96x96 charset.
      This is going to lead to problems because you can run out of
      room, esp. as we don't yet recycle numbers. */
   Vcharset_composite =
-    make_charset (-1, Qcomposite, LEADING_BYTE_COMPOSITE, 3,
+    make_charset (LEADING_BYTE_COMPOSITE, Qcomposite,
                  CHARSET_TYPE_96X96, 2, 0, 0,
                  CHARSET_LEFT_TO_RIGHT,
                  CHARSET_TYPE_96X96, 2, 0, 0,
                  CHARSET_LEFT_TO_RIGHT,
+                 build_string ("Composite"),
+                 build_string ("Composite characters"),
                  build_string ("Composite characters"),
                  build_string (""));
 
   composite_char_row_next = 32;
   composite_char_col_next = 32;
 
                  build_string ("Composite characters"),
                  build_string (""));
 
   composite_char_row_next = 32;
   composite_char_col_next = 32;
 
-  Vcomposite_char_string2char_hashtable =
-    make_lisp_hashtable (500, HASHTABLE_NONWEAK, HASHTABLE_EQUAL);
-  Vcomposite_char_char2string_hashtable =
-    make_lisp_hashtable (500, HASHTABLE_NONWEAK, HASHTABLE_EQ);
-  staticpro (&Vcomposite_char_string2char_hashtable);
-  staticpro (&Vcomposite_char_char2string_hashtable);
+  Vcomposite_char_string2char_hash_table =
+    make_lisp_hash_table (500, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);
+  Vcomposite_char_char2string_hash_table =
+    make_lisp_hash_table (500, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ);
+  staticpro (&Vcomposite_char_string2char_hash_table);
+  staticpro (&Vcomposite_char_char2string_hash_table);
+#endif /* ENABLE_COMPOSITE_CHARS */
 
 }
 
 }