aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/uhc.c
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/uhc.c
parent3dc08a7eecc97660b30740f65f4fc4f334600c2e (diff)
downloadglibc-06c17c788b6cbd81e4fceab455f29feb7f3043b2.tar
glibc-06c17c788b6cbd81e4fceab455f29feb7f3043b2.tar.gz
glibc-06c17c788b6cbd81e4fceab455f29feb7f3043b2.tar.bz2
glibc-06c17c788b6cbd81e4fceab455f29feb7f3043b2.zip
[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/uhc.c')
-rw-r--r--iconvdata/uhc.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/iconvdata/uhc.c b/iconvdata/uhc.c
index 5d25b863ee..1234346c8d 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; \