diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-12-28 02:59:59 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-12-28 02:59:59 +0000 |
commit | ffa156afcc46a0b8688a0094e62bc240b4b279a1 (patch) | |
tree | 7e4796907a02fde9a61a48c4cbafc48229eedba9 /iconvdata/gb2312.h | |
parent | f3d703cd527d3566808da08ce30b22ec288a78a9 (diff) | |
download | glibc-ffa156afcc46a0b8688a0094e62bc240b4b279a1.tar.gz glibc-ffa156afcc46a0b8688a0094e62bc240b4b279a1.tar.xz glibc-ffa156afcc46a0b8688a0094e62bc240b4b279a1.zip |
Update.
* iconvdata/gb2312.h (ucs4_to_gb2312): Fix mapping of 0x0101, 0x2312, and 0x2500..0x254b. * iconvdata/TESTS: Add EUC-CN. * iconvdata/testdata/EUC-CN: New file.
Diffstat (limited to 'iconvdata/gb2312.h')
-rw-r--r-- | iconvdata/gb2312.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/iconvdata/gb2312.h b/iconvdata/gb2312.h index 5cac987f2f..ffeb666a34 100644 --- a/iconvdata/gb2312.h +++ b/iconvdata/gb2312.h @@ -75,7 +75,7 @@ ucs4_to_gb2312 (uint32_t wch, unsigned char *s, size_t avail) switch (ch) { - case 0xa4 ... 0x100: + case 0xa4 ... 0x101: cp = __gb2312_from_ucs4_tab1[ch - 0xa4]; break; case 0x113: @@ -135,7 +135,7 @@ ucs4_to_gb2312 (uint32_t wch, unsigned char *s, size_t avail) case 0x2103 ... 0x22a5: cp = __gb2312_from_ucs4_tab5[ch - 0x2103]; break; - case 0x2313: + case 0x2312: cp = "\x21\x50"; break; case 0x2460 ... 0x249b: @@ -143,7 +143,7 @@ ucs4_to_gb2312 (uint32_t wch, unsigned char *s, size_t avail) break; case 0x2500 ... 0x254b: buf[0] = '\x29'; - buf[1] = '\x24' + (ch & 256); + buf[1] = '\x24' + (ch % 256); break; case 0x25a0: cp = "\x21\x76"; |