aboutsummaryrefslogtreecommitdiff
path: root/iconvdata
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-02-16 01:25:28 +0000
committerUlrich Drepper <drepper@redhat.com>2007-02-16 01:25:28 +0000
commit06c17c788b6cbd81e4fceab455f29feb7f3043b2 (patch)
tree4f80addedea34dd04da7172b85d9018f80e15d43 /iconvdata
parent3dc08a7eecc97660b30740f65f4fc4f334600c2e (diff)
downloadglibc-06c17c788b6cbd81e4fceab455f29feb7f3043b2.zip
glibc-06c17c788b6cbd81e4fceab455f29feb7f3043b2.tar.gz
glibc-06c17c788b6cbd81e4fceab455f29feb7f3043b2.tar.bz2
[BZ #3954]
* iconvdata/ksc5601.c (__ksc5601_sym_to_ucs, __ksc5601_sym_from_ucs): Add mapping for U+327E. * iconvdata/ksc5601.h (KSC5601_SYMBOL): Increment. * iconvdata/johab.c (BODY for FROM_LOOP, BODY for TO_LOOP): Enable mapping of 0xD9 0xE8. * iconvdata/uhc.c (BODY for FROM_LOOP, BODY for TO_LOOP): Disable mapping of U+327E. Reported by Jungshik Shin <jungshik@google.com>. [BZ #3955]
Diffstat (limited to 'iconvdata')
-rw-r--r--iconvdata/johab.c4
-rw-r--r--iconvdata/ksc5601.c6
-rw-r--r--iconvdata/ksc5601.h4
-rw-r--r--iconvdata/uhc.c16
4 files changed, 17 insertions, 13 deletions
diff --git a/iconvdata/johab.c b/iconvdata/johab.c
index 8f0ab64..58cb5bc 100644
--- a/iconvdata/johab.c
+++ b/iconvdata/johab.c
@@ -239,7 +239,7 @@ johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2)
if (__builtin_expect (ch2 < 0x31, 0) \
|| (__builtin_expect (ch2 > 0x7e, 0) && ch2 < 0x91) \
|| __builtin_expect (ch2, 0) == 0xff \
- || (__builtin_expect (ch, 0) == 0xd9 && ch2 > 0xe7) \
+ || (__builtin_expect (ch, 0) == 0xd9 && ch2 > 0xe8) \
|| (__builtin_expect (ch, 0) == 0xda \
&& ch2 > 0xa0 && ch2 < 0xd4) \
|| (__builtin_expect (ch, 0) == 0xde && ch2 > 0xf1)) \
@@ -386,7 +386,7 @@ johab_sym_hanja_to_ucs (uint_fast32_t idx, uint_fast32_t c1, uint_fast32_t c2)
break; \
} \
if (__builtin_expect (written == __UNKNOWN_10646_CHAR, 0) \
- || (outptr[0] == 0x22 && outptr[1] > 0x67)) \
+ || (outptr[0] == 0x22 && outptr[1] > 0x68)) \
{ \
UNICODE_TAG_HANDLER (ch, 4); \
STANDARD_TO_LOOP_ERR_HANDLER (4); \
diff --git a/iconvdata/ksc5601.c b/iconvdata/ksc5601.c
index bf8ce35..30e4681 100644
--- a/iconvdata/ksc5601.c
+++ b/iconvdata/ksc5601.c
@@ -1,5 +1,5 @@
/* Conversion tables for KS C 5601-1992 based encoding conversion.
- Copyright (C) 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2000, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jungshik Shin <jshin@pantheon.yale.edu>, 1998.
@@ -412,7 +412,8 @@ const uint16_t __ksc5601_sym_to_ucs[] =
[0x0098] = 0x2669, [0x0099] = 0x266a, [0x009a] = 0x266c, [0x009b] = 0x327f,
[0x009c] = 0x321c, [0x009d] = 0x2116, [0x009e] = 0x33c7, [0x009f] = 0x2122,
[0x00a0] = 0x33c2, [0x00a1] = 0x33d8, [0x00a2] = 0x2121, [0x00a3] = 0x20ac,
- [0x00a4] = 0x00ae, [0x00bc] = 0xff01, [0x00bd] = 0xff02, [0x00be] = 0xff03,
+ [0x00a4] = 0x00ae, [0x00a5] = 0x327e,
+ [0x00bc] = 0xff01, [0x00bd] = 0xff02, [0x00be] = 0xff03,
[0x00bf] = 0xff04, [0x00c0] = 0xff05, [0x00c1] = 0xff06, [0x00c2] = 0xff07,
[0x00c3] = 0xff08, [0x00c4] = 0xff09, [0x00c5] = 0xff0a, [0x00c6] = 0xff0b,
[0x00c7] = 0xff0c, [0x00c8] = 0xff0d, [0x00c9] = 0xff0e, [0x00ca] = 0xff0f,
@@ -917,6 +918,7 @@ const struct map __ksc5601_sym_from_ucs[KSC5601_SYMBOL] =
{0x3273, "\x28\x44"}, {0x3274, "\x28\x45"}, {0x3275, "\x28\x46"},
{0x3276, "\x28\x47"}, {0x3277, "\x28\x48"}, {0x3278, "\x28\x49"},
{0x3279, "\x28\x4a"}, {0x327a, "\x28\x4b"}, {0x327b, "\x28\x4c"},
+ {0x327e, "\x22\x68"},
{0x327f, "\x22\x5e"}, {0x3380, "\x27\x49"}, {0x3381, "\x27\x4a"},
{0x3382, "\x27\x4b"}, {0x3383, "\x27\x4c"}, {0x3384, "\x27\x4d"},
{0x3388, "\x27\x3a"}, {0x3389, "\x27\x3b"}, {0x338a, "\x27\x5c"},
diff --git a/iconvdata/ksc5601.h b/iconvdata/ksc5601.h
index 603a337..77f47ca 100644
--- a/iconvdata/ksc5601.h
+++ b/iconvdata/ksc5601.h
@@ -1,5 +1,5 @@
/* Access functions for KS C 5601-1992 based encoding conversion.
- Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2003, 2007 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
@@ -22,7 +22,7 @@
#define KSC5601_HANGUL 2350
#define KSC5601_HANJA 4888
-#define KSC5601_SYMBOL 988
+#define KSC5601_SYMBOL 989
#include <gconv.h>
#include <stdint.h>
diff --git a/iconvdata/uhc.c b/iconvdata/uhc.c
index 5d25b86..1234346 100644
--- a/iconvdata/uhc.c
+++ b/iconvdata/uhc.c
@@ -1,5 +1,5 @@
/* Mapping tables for UHC handling.
- Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000-2002, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jungshik Shin <jshin@pantheon.yale.edu>, 1998.
@@ -3135,7 +3135,8 @@ static const char uhc_hangul_from_ucs[11172][2] =
else \
{ \
ch = ksc5601_to_ucs4 (&inptr, 2, 0x80); \
- if (__builtin_expect (ch == __UNKNOWN_10646_CHAR, 0)) \
+ if (__builtin_expect (ch == __UNKNOWN_10646_CHAR, 0) \
+ || __builtin_expect (ch == 0x327e, 0)) \
{ \
/* Illegal. */ \
STANDARD_FROM_LOOP_ERR_HANDLER (2); \
@@ -3207,16 +3208,17 @@ static const char uhc_hangul_from_ucs[11172][2] =
{ \
size_t written = ucs4_to_ksc5601_sym (ch, outptr, outend - outptr); \
\
+ if (__builtin_expect (ch == 0x327e, 0) \
+ || __builtin_expect (written == __UNKNOWN_10646_CHAR, 0)) \
+ { \
+ UNICODE_TAG_HANDLER (ch, 4); \
+ STANDARD_TO_LOOP_ERR_HANDLER (4); \
+ } \
if (__builtin_expect (written == 0, 0)) \
{ \
result = __GCONV_FULL_OUTPUT; \
break; \
} \
- if (__builtin_expect (written == __UNKNOWN_10646_CHAR, 0)) \
- { \
- UNICODE_TAG_HANDLER (ch, 4); \
- STANDARD_TO_LOOP_ERR_HANDLER (4); \
- } \
\
*outptr++ |= 0x80; \
*outptr++ |= 0x80; \