aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-20 21:20:46 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-20 21:20:46 +0000
commit3b7caeac2c8d9dc0ceb84137e1e012845d58c90d (patch)
tree3fe204747cbdd74e573c7265fe12224355d37e3a
parentb72f9d5197d1281664c3fd0ccffa328dfc195818 (diff)
downloadglibc-3b7caeac2c8d9dc0ceb84137e1e012845d58c90d.tar.xz
glibc-3b7caeac2c8d9dc0ceb84137e1e012845d58c90d.zip
Update.
* iconvdata/run-iconv-test.sh: Reorgnize a bit to allow running only the ASCII test. * iconvdata/TESTS: Add entries for IBM932 and IBM943. * iconvdata/Makefile (modules): Add IBM932 and IBM943. * iconvdata/gconv-modules: Add entries for IBM932 and IBM943. * iconvdata/ibm932.c: New file. * iconvdata/ibm932.h: New file. * iconvdata/ibm943.c: New file. * iconvdata/ibm943.h: New file. Patches by Masahide Washizawa <washi@jp.ibm.com>.
-rw-r--r--ChangeLog12
-rw-r--r--iconvdata/Makefile7
-rw-r--r--iconvdata/TESTS4
-rw-r--r--iconvdata/gconv-modules12
-rw-r--r--iconvdata/ibm932.c234
-rw-r--r--iconvdata/ibm932.h3678
-rw-r--r--iconvdata/ibm943.c234
-rw-r--r--iconvdata/ibm943.h3732
-rwxr-xr-xiconvdata/run-iconv-test.sh117
9 files changed, 7971 insertions, 59 deletions
diff --git a/ChangeLog b/ChangeLog
index 466520ff33..f0b51c7c56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2001-01-20 Ulrich Drepper <drepper@redhat.com>
+ * iconvdata/run-iconv-test.sh: Reorgnize a bit to allow running only
+ the ASCII test.
+ * iconvdata/TESTS: Add entries for IBM932 and IBM943.
+
+ * iconvdata/Makefile (modules): Add IBM932 and IBM943.
+ * iconvdata/gconv-modules: Add entries for IBM932 and IBM943.
+ * iconvdata/ibm932.c: New file.
+ * iconvdata/ibm932.h: New file.
+ * iconvdata/ibm943.c: New file.
+ * iconvdata/ibm943.h: New file.
+ Patches by Masahide Washizawa <washi@jp.ibm.com>.
+
* sysdeps/generic/dl-sysdep.c (_dl_sysdep_start): Fix typo
preventing optimization from being done. Set the correct type bit
in seen. Don't define and use _dl_base_addr unless
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index 63247d7422..7f625abd78 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,7 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 \
IBM280 IBM281 IBM284 IBM285 IBM290 IBM297 IBM420 IBM424 \
IBM437 IBM850 IBM851 IBM852 IBM855 IBM857 IBM860 IBM861 \
IBM862 IBM863 IBM864 IBM865 IBM868 IBM869 IBM875 IBM880 \
- IBM866 CP1258 IBM922 IBM1124 IBM1129 \
+ IBM866 CP1258 IBM922 IBM1124 IBM1129 IBM932 IBM943 \
IBM856 IBM930 IBM933 IBM935 IBM937 IBM939 IBM1046 \
IBM918 IBM1004 IBM1026 CP1250 CP1251 CP1252 CP1253 CP1254 \
CP1255 CP1256 CP1257 ISO-2022-JP MACINTOSH IEC_P27-1 \
@@ -135,7 +135,8 @@ distribute := gconv-modules extra-module.mk gap.awk gaptab.awk \
t.61.c uhc.c sami-ws2.c iso-ir-197.c tis-620.c koi8-u.c \
isiri-3342.c isiri-3342.h gbgbk.c iso-2022-cn.c cns11643l2.h \
iso8859-16.c utf-16.c unicode.c utf-7.c big5hkscs.c \
- iso-ir-165.c iso-ir-165.h gb18030.c iso-2022-cn-ext.c
+ iso-ir-165.c iso-ir-165.h gb18030.c iso-2022-cn-ext.c \
+ ibm932.c ibm932.h ibm943.c ibm943.h
# We build the transformation modules only when we build shared libs.
ifeq (yes,$(build-shared))
diff --git a/iconvdata/TESTS b/iconvdata/TESTS
index cbdae2ea44..d5bd568625 100644
--- a/iconvdata/TESTS
+++ b/iconvdata/TESTS
@@ -1,5 +1,5 @@
# Available tests for iconv(1) (and therefore iconv(3)) in GNU libc.
-# Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
#
@@ -95,3 +95,5 @@ IBM935 IBM935 N UTF8
IBM937 IBM937 N UTF8
IBM939 IBM939 N UTF8
IBM1046 IBM1046 Y UTF8
+IBM932 IBM932 N
+IBM943 IBM943 N
diff --git a/iconvdata/gconv-modules b/iconvdata/gconv-modules
index 550fe0a3ad..8c0e3e4638 100644
--- a/iconvdata/gconv-modules
+++ b/iconvdata/gconv-modules
@@ -841,6 +841,12 @@ module IBM930// INTERNAL IBM930 1
module INTERNAL IBM930// IBM930 1
# from to module cost
+alias IBM-932// IBM932//
+alias CSIBM932// IBM932//
+module IBM932// INTERNAL IBM932 1
+module INTERNAL IBM932// IBM932 1
+
+# from to module cost
alias IBM-933// IBM933//
alias CP933// IBM933//
alias EBCDIC-CP-AR2// IBM933//
@@ -873,6 +879,12 @@ module IBM939// INTERNAL IBM939 1
module INTERNAL IBM939// IBM939 1
# from to module cost
+alias IBM-943// IBM943//
+alias CSIBM943// IBM943//
+module IBM943// INTERNAL IBM943 1
+module INTERNAL IBM943// IBM943 1
+
+# from to module cost
alias CP1004// IBM1004//
alias OS2LATIN1// IBM1004//
module IBM1004// INTERNAL IBM1004 1
diff --git a/iconvdata/ibm932.c b/iconvdata/ibm932.c
new file mode 100644
index 0000000000..07fdd25f6e
--- /dev/null
+++ b/iconvdata/ibm932.c
@@ -0,0 +1,234 @@
+/* Conversion from and to IBM932.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Masahide Washizawa <washi@jp.ibm.com>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include "ibm932.h"
+
+#ifndef TRUE
+#define TRUE 1
+#define FALSE 0
+#endif
+
+#define FROM 0
+#define TO 1
+
+/* Definitions used in the body of the `gconv' function. */
+#define CHARSET_NAME "IBM932//"
+#define FROM_LOOP from_ibm932
+#define TO_LOOP to_ibm932
+
+/* Definitions of initialization and destructor function. */
+#define DEFINE_INIT 1
+#define DEFINE_FINI 1
+
+#define MIN_NEEDED_FROM 1
+#define MAX_NEEDED_FROM 2
+#define MIN_NEEDED_TO 4
+
+/* First, define the conversion function from IBM-932 to UCS4. */
+#define MIN_NEEDED_INPUT MIN_NEEDED_FROM
+#define MAX_NEEDED_INPUT MAX_NEEDED_FROM
+#define MIN_NEEDED_OUTPUT MIN_NEEDED_TO
+#define LOOPFCT FROM_LOOP
+#define BODY \
+ { \
+ const struct gap *rp1 = __ibm932sb_to_ucs4_idx; \
+ const struct gap *rp2 = __ibm932db_to_ucs4_idx; \
+ uint32_t ch = *inptr; \
+ uint32_t res; \
+ \
+ if (__builtin_expect (ch, 0) >= 0xffff) \
+ { \
+ rp1 = NULL; \
+ rp2 = NULL; \
+ } \
+ else if (__builtin_expect (ch, 0) == 0x80 \
+ || __builtin_expect (ch, 0) == 0xa0 \
+ || __builtin_expect (ch, 0) == 0xfd \
+ || __builtin_expect (ch, 0) == 0xfe \
+ || __builtin_expect (ch, 0) == 0xff) \
+ { \
+ /* This is an illegal character. */ \
+ if (! ignore_errors_p ()) \
+ { \
+ result = __GCONV_ILLEGAL_INPUT; \
+ break; \
+ } \
+ } \
+ else \
+ { \
+ while (ch > rp1->end) \
+ ++rp1; \
+ } \
+ \
+ /* Use the IBM932 table for single byte. */ \
+ if (__builtin_expect (rp1 == NULL, 0) \
+ || __builtin_expect (ch < rp1->start, 0) \
+ || (res = __ibm932sb_to_ucs4[ch + rp1->idx], \
+ __builtin_expect (res, '\1') == 0 && ch != 0)) \
+ { \
+ \
+ /* Use the IBM932 table for double byte. */ \
+ if (__builtin_expect (inptr + 1 >= inend, 0)) \
+ { \
+ /* The second character is not available. \
+ Store the intermediate result. */ \
+ result = __GCONV_INCOMPLETE_INPUT; \
+ break; \
+ } \
+ \
+ ch = (ch * 0x100) + inptr[1]; \
+ while (ch > rp2->end) \
+ ++rp2; \
+ \
+ if (__builtin_expect (rp2 == NULL, 0) \
+ || __builtin_expect (ch < rp2->start, 0) \
+ || (res = __ibm932db_to_ucs4[ch + rp2->idx], \
+ __builtin_expect (res, '\1') == 0 && ch !=0)) \
+ { \
+ /* This is an illegal character. */ \
+ if (! ignore_errors_p ()) \
+ { \
+ result = __GCONV_ILLEGAL_INPUT; \
+ break; \
+ } \
+ ++*irreversible; \
+ inptr += 2; \
+ continue; \
+ } \
+ else \
+ { \
+ put32 (outptr, res); \
+ outptr += 4; \
+ inptr += 2; \
+ } \
+ } \
+ else \
+ { \
+ if (res == 0x1c) \
+ res = 0x1a; \
+ else if (res == 0x7f) \
+ res = 0x1c; \
+ else if (res == 0xa5) \
+ res = 0x5c; \
+ else if (res == 0x203e) \
+ res = 0x7e; \
+ else if (res == 0x1a) \
+ res = 0x7f; \
+ put32 (outptr, res); \
+ outptr += 4; \
+ inptr++; \
+ } \
+ }
+#define LOOP_NEED_FLAGS
+#include <iconv/loop.c>
+
+/* Next, define the other direction. */
+#define MIN_NEEDED_INPUT MIN_NEEDED_TO
+#define MIN_NEEDED_OUTPUT MIN_NEEDED_FROM
+#define MAX_NEEDED_OUTPUT MAX_NEEDED_FROM
+#define LOOPFCT TO_LOOP
+#define BODY \
+ { \
+ const struct gap *rp = __ucs4_to_ibm932sb_idx; \
+ unsigned char sc; \
+ uint32_t ch = get32(inptr); \
+ uint16_t found = TRUE; \
+ uint32_t i; \
+ uint32_t low; \
+ uint32_t high; \
+ uint16_t pccode; \
+ \
+ if (__builtin_expect (ch, 0) >= 0xffff) \
+ rp = NULL; \
+ else \
+ while (ch > rp->end) \
+ ++rp; \
+ \
+ /* Use the UCS4 table for single byte. */ \
+ if (__builtin_expect (rp == NULL, 0) \
+ || __builtin_expect (ch < rp->start, 0) \
+ || (sc = __ucs4_to_ibm932sb[ch + rp->idx], \
+ __builtin_expect (sc, '\1') == '\0' && ch != L'\0')) \
+ { \
+ \
+ /* Use the UCS4 table for double byte. */ \
+ found = FALSE; \
+ low = 0; \
+ high = (sizeof (__ucs4_to_ibm932db) >> 1) \
+ / sizeof (__ucs4_to_ibm932db[0][FROM]); \
+ pccode = ch; \
+ while (low <= high) \
+ { \
+ i = (low + high) >> 1; \
+ if (pccode < __ucs4_to_ibm932db[i][FROM]) \
+ high = i - 1; \
+ else if (pccode > __ucs4_to_ibm932db[i][FROM]) \
+ low = i + 1; \
+ else \
+ { \
+ pccode = __ucs4_to_ibm932db[i][TO]; \
+ found = TRUE; \
+ break; \
+ } \
+ } \
+ if (found) \
+ { \
+ if (__builtin_expect (outptr + 2 > outend, 0)) \
+ { \
+ result = __GCONV_FULL_OUTPUT; \
+ break; \
+ } \
+ *outptr++ = pccode >> 8 & 0xff; \
+ *outptr++ = pccode & 0xff; \
+ } \
+ else \
+ { \
+ /* This is an illegal character. */ \
+ if (! ignore_errors_p ()) \
+ { \
+ result = __GCONV_ILLEGAL_INPUT; \
+ break; \
+ } \
+ ++*irreversible; \
+ } \
+ } \
+ else \
+ { \
+ if (__builtin_expect (outptr + 1 > outend, 0)) \
+ { \
+ result = __GCONV_FULL_OUTPUT; \
+ break; \
+ } \
+ if (ch == 0x5c) \
+ *outptr++ = 0x5c; \
+ else if (ch == 0x7e) \
+ *outptr++ = 0x7e; \
+ else \
+ *outptr++ = sc; \
+ } \
+ \
+ /* Now that we wrote the output increment the input pointer. */ \
+ inptr += 4; \
+ }
+#define LOOP_NEED_FLAGS
+#include <iconv/loop.c>
+
+/* Now define the toplevel functions. */
+#include <iconv/skeleton.c>
diff --git a/iconvdata/ibm932.h b/iconvdata/ibm932.h
new file mode 100644
index 0000000000..fa0f5916fd
--- /dev/null
+++ b/iconvdata/ibm932.h
@@ -0,0 +1,3678 @@
+/* Tables for conversion from and to IBM932.
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Masahide Washizawa <washi@jp.ibm.com>, 2000.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#ifndef _IBM932_H
+#define _IBM932_H 1
+
+#include <gconv.h>
+#include <stdint.h>
+
+struct gap
+{
+ uint16_t start;
+ uint16_t end;
+ int32_t idx;
+};
+
+static const struct gap __ibm932sb_to_ucs4_idx[] =
+{
+ { start: 0x0000, end: 0x00ff, idx: 0 },
+ { start: 0xffff, end: 0xffff, idx: 0 }
+};
+
+static const uint16_t __ibm932sb_to_ucs4[] =
+{
+ 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
+ 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
+ 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017,
+ 0x0018, 0x0019, 0x001c, 0x001b, 0x007f, 0x001d, 0x001e, 0x001f,
+ 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
+ 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
+ 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
+ 0x0038, 0x0039, 0x003a, 0x003b, 0x003c, 0x003d, 0x003e, 0x003f,
+ 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
+ 0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f,
+ 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
+ 0x0058, 0x0059, 0x005a, 0x005b, 0x00a5, 0x005d, 0x005e, 0x005f,
+ 0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
+ 0x0068, 0x0069, 0x006a, 0x006b, 0x006c, 0x006d, 0x006e, 0x006f,
+ 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
+ 0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x203e, 0x001a,
+ 0x00a2, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x00a3, 0xff61, 0xff62, 0xff63, 0xff64, 0xff65, 0xff66, 0xff67,
+ 0xff68, 0xff69, 0xff6a, 0xff6b, 0xff6c, 0xff6d, 0xff6e, 0xff6f,
+ 0xff70, 0xff71, 0xff72, 0xff73, 0xff74, 0xff75, 0xff76, 0xff77,
+ 0xff78, 0xff79, 0xff7a, 0xff7b, 0xff7c, 0xff7d, 0xff7e, 0xff7f,
+ 0xff80, 0xff81, 0xff82, 0xff83, 0xff84, 0xff85, 0xff86, 0xff87,
+ 0xff88, 0xff89, 0xff8a, 0xff8b, 0xff8c, 0xff8d, 0xff8e, 0xff8f,
+ 0xff90, 0xff91, 0xff92, 0xff93, 0xff94, 0xff95, 0xff96, 0xff97,
+ 0xff98, 0xff99, 0xff9a, 0xff9b, 0xff9c, 0xff9d, 0xff9e, 0xff9f,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x00ac, 0x005c, 0x007e
+};
+
+static const struct gap __ibm932db_to_ucs4_idx[] =
+{
+ { start: 0x8140, end: 0x81fc, idx: -33088 },
+ { start: 0x824f, end: 0x82f1, idx: -33170 },
+ { start: 0x8340, end: 0x83d6, idx: -33248 },
+ { start: 0x8440, end: 0x84be, idx: -33353 },
+ { start: 0x889f, end: 0x88fc, idx: -34345 },
+ { start: 0x8940, end: 0x89fc, idx: -34412 },
+ { start: 0x8a40, end: 0x8afc, idx: -34479 },
+ { start: 0x8b40, end: 0x8bfc, idx: -34546 },
+ { start: 0x8c40, end: 0x8cfc, idx: -34613 },
+ { start: 0x8d40, end: 0x8dfc, idx: -34680 },
+ { start: 0x8e40, end: 0x8efc, idx: -34747 },
+ { start: 0x8f40, end: 0x8ffc, idx: -34814 },
+ { start: 0x9040, end: 0x90fc, idx: -34881 },
+ { start: 0x9140, end: 0x91fc, idx: -34948 },
+ { start: 0x9240, end: 0x92fc, idx: -35015 },
+ { start: 0x9340, end: 0x93fc, idx: -35082 },
+ { start: 0x9440, end: 0x94fc, idx: -35149 },
+ { start: 0x9540, end: 0x95fc, idx: -35216 },
+ { start: 0x9640, end: 0x96fc, idx: -35283 },
+ { start: 0x9740, end: 0x97fc, idx: -35350 },
+ { start: 0x9840, end: 0x98fc, idx: -35417 },
+ { start: 0x9940, end: 0x99fc, idx: -35484 },
+ { start: 0x9a40, end: 0x9afc, idx: -35551 },
+ { start: 0x9b40, end: 0x9bfc, idx: -35618 },
+ { start: 0x9c40, end: 0x9cfc, idx: -35685 },
+ { start: 0x9d40, end: 0x9dfc, idx: -35752 },
+ { start: 0x9e40, end: 0x9efc, idx: -35819 },
+ { start: 0x9f40, end: 0x9ffc, idx: -35886 },
+ { start: 0xe040, end: 0xe0fc, idx: -52337 },
+ { start: 0xe140, end: 0xe1fc, idx: -52404 },
+ { start: 0xe240, end: 0xe2fc, idx: -52471 },
+ { start: 0xe340, end: 0xe3fc, idx: -52538 },
+ { start: 0xe440, end: 0xe4fc, idx: -52605 },
+ { start: 0xe540, end: 0xe5fc, idx: -52672 },
+ { start: 0xe640, end: 0xe6fc, idx: -52739 },
+ { start: 0xe740, end: 0xe7fc, idx: -52806 },
+ { start: 0xe840, end: 0xe8fc, idx: -52873 },
+ { start: 0xe940, end: 0xe9fc, idx: -52940 },
+ { start: 0xea40, end: 0xeaa4, idx: -53007 },
+ { start: 0xf040, end: 0xf0fc, idx: -54442 },
+ { start: 0xf140, end: 0xf1fc, idx: -54509 },
+ { start: 0xf240, end: 0xf2fc, idx: -54576 },
+ { start: 0xf340, end: 0xf3fc, idx: -54643 },
+ { start: 0xf440, end: 0xf4fc, idx: -54710 },
+ { start: 0xf540, end: 0xf5fc, idx: -54777 },
+ { start: 0xf640, end: 0xf6fc, idx: -54844 },
+ { start: 0xf740, end: 0xf7fc, idx: -54911 },
+ { start: 0xf840, end: 0xf8fc, idx: -54978 },
+ { start: 0xf940, end: 0xf9fc, idx: -55045 },
+ { start: 0xfa40, end: 0xfafc, idx: -55112 },
+ { start: 0xfb40, end: 0xfbfc, idx: -55179 },
+ { start: 0xfc40, end: 0xfc4b, idx: -55246 },
+ { start: 0xffff, end: 0xffff, idx: 0 }
+};
+
+static const uint16_t __ibm932db_to_ucs4[] =
+{
+ 0x3000, 0x3001, 0x3002, 0xff0c, 0xff0e, 0x30fb, 0xff1a, 0xff1b,
+ 0xff1f, 0xff01, 0x309b, 0x309c, 0x00b4, 0xff40, 0x00a8, 0xff3e,
+ 0xffe3, 0xff3f, 0x30fd, 0x30fe, 0x309d, 0x309e, 0x3003, 0x4edd,
+ 0x3005, 0x3006, 0x3007, 0x30fc, 0x2014, 0x2010, 0xff0f, 0xff3c,
+ 0x301c, 0x2016, 0xff5c, 0x2026, 0x2025, 0x2018, 0x2019, 0x201c,
+ 0x201d, 0xff08, 0xff09, 0x3014, 0x3015, 0xff3b, 0xff3d, 0xff5b,
+ 0xff5d, 0x3008, 0x3009, 0x300a, 0x300b, 0x300c, 0x300d, 0x300e,
+ 0x300f, 0x3010, 0x3011, 0xff0b, 0x2212, 0x00b1, 0x00d7, 0x0000,
+ 0x00f7, 0xff1d, 0x2260, 0xff1c, 0xff1e, 0x2266, 0x2267, 0x221e,
+ 0x2234, 0x2642, 0x2640, 0x00b0, 0x2032, 0x2033, 0x2103, 0xffe5,
+ 0xff04, 0xffe0, 0xffe1, 0xff05, 0xff03, 0xff06, 0xff0a, 0xff20,
+ 0x00a7, 0x2606, 0x2605, 0x25cb, 0x25cf, 0x25ce, 0x25c7, 0x25c6,
+ 0x25a1, 0x25a0, 0x25b3, 0x25b2, 0x25bd, 0x25bc, 0x203b, 0x3012,
+ 0x2192, 0x2190, 0x2191, 0x2193, 0x3013, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x2208, 0x220b, 0x2286, 0x2287, 0x2282, 0x2283, 0x222a, 0x2229,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x2227, 0x2228, 0x0000, 0x21d2, 0x21d4, 0x2200, 0x2203, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x2220, 0x22a5, 0x2312, 0x2202, 0x2207, 0x2261,
+ 0x2252, 0x226a, 0x226b, 0x221a, 0x223d, 0x221d, 0x0000, 0x222b,
+ 0x222c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x212b, 0x2030, 0x266f, 0x266d, 0x266a, 0x2020, 0x2021, 0x00b6,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x25ef, 0xff10, 0xff11, 0xff12,
+ 0xff13, 0xff14, 0xff15, 0xff16, 0xff17, 0xff18, 0xff19, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xff21, 0xff22,
+ 0xff23, 0xff24, 0xff25, 0xff26, 0xff27, 0xff28, 0xff29, 0xff2a,
+ 0xff2b, 0xff2c, 0xff2d, 0xff2e, 0xff2f, 0xff30, 0xff31, 0xff32,
+ 0xff33, 0xff34, 0xff35, 0xff36, 0xff37, 0xff38, 0xff39, 0xff3a,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0xff41,
+ 0xff42, 0xff43, 0xff44, 0xff45, 0xff46, 0xff47, 0xff48, 0xff49,
+ 0xff4a, 0xff4b, 0xff4c, 0xff4d, 0xff4e, 0xff4f, 0xff50, 0xff51,
+ 0xff52, 0xff53, 0xff54, 0xff55, 0xff56, 0xff57, 0xff58, 0xff59,
+ 0xff5a, 0x0000, 0x0000, 0x0000, 0x0000, 0x3041, 0x3042, 0x3043,
+ 0x3044, 0x3045, 0x3046, 0x3047, 0x3048, 0x3049, 0x304a, 0x304b,
+ 0x304c, 0x304d, 0x304e, 0x304f, 0x3050, 0x3051, 0x3052, 0x3053,
+ 0x3054, 0x3055, 0x3056, 0x3057, 0x3058, 0x3059, 0x305a, 0x305b,
+ 0x305c, 0x305d, 0x305e, 0x305f, 0x3060, 0x3061, 0x3062, 0x3063,
+ 0x3064, 0x3065, 0x3066, 0x3067, 0x3068, 0x3069, 0x306a, 0x306b,
+ 0x306c, 0x306d, 0x306e, 0x306f, 0x3070, 0x3071, 0x3072, 0x3073,
+ 0x3074, 0x3075, 0x3076, 0x3077, 0x3078, 0x3079, 0x307a, 0x307b,
+ 0x307c, 0x307d, 0x307e, 0x307f, 0x3080, 0x3081, 0x3082, 0x3083,
+ 0x3084, 0x3085, 0x3086, 0x3087, 0x3088, 0x3089, 0x308a, 0x308b,
+ 0x308c, 0x308d, 0x308e, 0x308f, 0x3090, 0x3091, 0x3092, 0x3093,
+ 0x30a1, 0x30a2, 0x30a3, 0x30a4, 0x30a5, 0x30a6, 0x30a7, 0x30a8,
+ 0x30a9, 0x30aa, 0x30ab, 0x30ac, 0x30ad, 0x30ae, 0x30af, 0x30b0,
+ 0x30b1, 0x30b2, 0x30b3, 0x30b4, 0x30b5, 0x30b6, 0x30b7, 0x30b8,
+ 0x30b9, 0x30ba, 0x30bb, 0x30bc, 0x30bd, 0x30be, 0x30bf, 0x30c0,
+ 0x30c1, 0x30c2, 0x30c3, 0x30c4, 0x30c5, 0x30c6, 0x30c7, 0x30c8,
+ 0x30c9, 0x30ca, 0x30cb, 0x30cc, 0x30cd, 0x30ce, 0x30cf, 0x30d0,
+ 0x30d1, 0x30d2, 0x30d3, 0x30d4, 0x30d5, 0x30d6, 0x30d7, 0x30d8,
+ 0x30d9, 0x30da, 0x30db, 0x30dc, 0x30dd, 0x30de, 0x30df, 0x0000,
+ 0x30e0, 0x30e1, 0x30e2, 0x30e3, 0x30e4, 0x30e5, 0x30e6, 0x30e7,
+ 0x30e8, 0x30e9, 0x30ea, 0x30eb, 0x30ec, 0x30ed, 0x30ee, 0x30ef,
+ 0x30f0, 0x30f1, 0x30f2, 0x30f3, 0x30f4, 0x30f5, 0x30f6, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0391,
+ 0x0392, 0x0393, 0x0394, 0x0395, 0x0396, 0x0397, 0x0398, 0x0399,
+ 0x039a, 0x039b, 0x039c, 0x039d, 0x039e, 0x039f, 0x03a0, 0x03a1,
+ 0x03a3, 0x03a4, 0x03a5, 0x03a6, 0x03a7, 0x03a8, 0x03a9, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x03b1,
+ 0x03b2, 0x03b3, 0x03b4, 0x03b5, 0x03b6, 0x03b7, 0x03b8, 0x03b9,
+ 0x03ba, 0x03bb, 0x03bc, 0x03bd, 0x03be, 0x03bf, 0x03c0, 0x03c1,
+ 0x03c3, 0x03c4, 0x03c5, 0x03c6, 0x03c7, 0x03c8, 0x03c9, 0x0410,
+ 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0401, 0x0416, 0x0417,
+ 0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
+ 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
+ 0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0430,
+ 0x04