diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-10-04 23:52:14 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-10-04 23:52:14 +0000 |
commit | 228cc8780fc6cd31de3f81543c0c08f2b3e3cde9 (patch) | |
tree | 7693d67f1e45f2bb984ac888531f0341f09246db /iconvdata/euc-kr.c | |
parent | 9ecb7b363d61a7bfc5f90df69fc231d6dd6ee87f (diff) | |
download | glibc-228cc8780fc6cd31de3f81543c0c08f2b3e3cde9.zip glibc-228cc8780fc6cd31de3f81543c0c08f2b3e3cde9.tar.gz glibc-228cc8780fc6cd31de3f81543c0c08f2b3e3cde9.tar.bz2 |
Update.
* iconvdata/euc-kr.c (euckr_from_ucs4): Handle U20a9.
(BODY from direction): Map \x5c to U20a9.
* iconvdata/testdata/EUC-KR..UTF8: Adjust to this change.
* iconvdata/EUC-KR.irreversible: New file.
Diffstat (limited to 'iconvdata/euc-kr.c')
-rw-r--r-- | iconvdata/euc-kr.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/iconvdata/euc-kr.c b/iconvdata/euc-kr.c index 9ea937c..0b4e29a 100644 --- a/iconvdata/euc-kr.c +++ b/iconvdata/euc-kr.c @@ -29,7 +29,13 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) { if (ch > 0x9f) { - if (__builtin_expect (ucs4_to_ksc5601 (ch, cp, 2), 0) + if (__builtin_expect (ch, 0) == 0x20a9) + { + /* Half-width Korean Currency WON sign. */ + cp[0] = '\\'; + cp[1] = '\0'; + } + else if (__builtin_expect (ucs4_to_ksc5601 (ch, cp, 2), 0) != __UNKNOWN_10646_CHAR) { cp[0] |= 0x80; @@ -38,9 +44,10 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) else cp[0] = '\0'; } - /* XXX Think about 0x5c ; '\'. */ else { + /* There is no mapping for U005c but we nevertheless map it to + \x5c. */ cp[0] = (unsigned char) ch; cp[1] = '\0'; } @@ -67,17 +74,14 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) { \ uint32_t ch = *inptr; \ \ - /* Half-width Korean Currency WON sign \ - \ - if (inchar == 0x5c) \ - ch = 0x20a9; \ - else if (inchar <= 0x7f) \ - ch = (uint32_t) inchar; \ - */ \ - \ if (ch <= 0x9f) \ - /* Plain ASCII. */ \ - ++inptr; \ + { \ + /* Plain ASCII with one exception. */ \ + if (ch == 0x5c) \ + /* Half-width Korean Currency WON sign. */ \ + ch = 0x20a9; \ + ++inptr; \ + } \ /* 0xfe(->0x7e : row 94) and 0xc9(->0x59 : row 41) are \ user-defined areas. */ \ else if (__builtin_expect (ch, 0xa1) == 0xa0 \ |