diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-09-05 02:41:25 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-09-05 02:41:25 +0000 |
commit | b79f74cd622578ce5eea1a3ed5840ac53d6b6d93 (patch) | |
tree | 2c0e56654a4df00616e8994f181434ddf3246549 /iconvdata/cns11643.h | |
parent | bcf6d602849db60d9651ffade87f18282c75ebd4 (diff) | |
download | glibc-b79f74cd622578ce5eea1a3ed5840ac53d6b6d93.tar.gz glibc-b79f74cd622578ce5eea1a3ed5840ac53d6b6d93.tar.xz glibc-b79f74cd622578ce5eea1a3ed5840ac53d6b6d93.zip |
Update.
2000-09-03 Bruno Haible <haible@clisp.cons.org> * charmaps/EUC-TW: Add commented non-reversible mappings. 2000-09-03 Bruno Haible <haible@clisp.cons.org> * charmaps/CP949: New file. 2000-09-03 Bruno Haible <haible@clisp.cons.org> * charmaps/GB2312: Remove 0x80..0xA0, 0xAA..0xAF, 0xF8..FF. 2000-09-03 Bruno Haible <haible@clisp.cons.org> * charmaps/EUC-JP: Nonreversibly map 0xA1C0 to U+005C and 0x8FA2B7 to U+007E.
Diffstat (limited to 'iconvdata/cns11643.h')
-rw-r--r-- | iconvdata/cns11643.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/iconvdata/cns11643.h b/iconvdata/cns11643.h index 27c484bbd2..b57aa9decb 100644 --- a/iconvdata/cns11643.h +++ b/iconvdata/cns11643.h @@ -1,5 +1,5 @@ /* Access functions for CNS 11643, plane 2 handling. - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -50,19 +50,19 @@ cns11643_to_ucs4 (const char **s, size_t avail, unsigned char offset) idx = (ch2 - 0x21 - offset) * 94 + (ch3 - 0x21 - offset); - if ((ch - 0x21 - offset) == 1) + if ((ch - 0x20 - offset) == 1) { - if (idx > 0x2196) + if (idx > 0x21f2) return __UNKNOWN_10646_CHAR; result = __cns11643l1_to_ucs4_tab[idx]; } - else if ((ch - 0x21 - offset) == 2) + else if ((ch - 0x20 - offset) == 2) { if (idx > 0x1de1) return __UNKNOWN_10646_CHAR; result = __cns11643l2_to_ucs4_tab[idx]; } - else if ((ch - 0x21 - offset) == 0xe) + else if ((ch - 0x20 - offset) == 0xe) { if (idx > 0x19bd) return __UNKNOWN_10646_CHAR; @@ -166,7 +166,7 @@ ucs4_to_cns11643 (uint32_t wch, char *s, size_t avail) break; case 0x3105 ... 0x3129: buf[0] = '\x25'; - buf[1] = '\x26' + (ch - 0x3105); + buf[1] = '\x47' + (ch - 0x3105); break; case 0x32a3: cp = "\x22\x21"; @@ -177,12 +177,13 @@ ucs4_to_cns11643 (uint32_t wch, char *s, size_t avail) case 0x4e00 ... 0x9f9c: cp = __cns11643l1_from_ucs4_tab12[ch - 0x4e00]; - if (cp[0] == '\0') - { - /* Let's try the other planes. */ - needed = 3; - cp = __cns11643_from_ucs4_tab[ch - 0x4e00]; - } + if (cp[0] != '\0') + break; + /* FALLTHROUGH. Let's try the other planes. */ + case 0x9f9d ... 0x9fa5: + /* Let's try the other planes. */ + needed = 3; + cp = __cns11643_from_ucs4_tab[ch - 0x4e00]; break; case 0xfe30 ... 0xfe6b: cp = __cns11643l1_from_ucs4_tab13[ch - 0xfe30]; |