From: Ulrich Drepper Date: Tue, 28 Dec 1999 04:55:10 +0000 (+0000) Subject: (ucs4_to_gb2312): Fix mapping of 0x0101, 0x2312, and 0x2500..0x254b. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73961b12d2f9a38185df3197ea175ee11cde6cda;p=thirdparty%2Fglibc.git (ucs4_to_gb2312): Fix mapping of 0x0101, 0x2312, and 0x2500..0x254b. --- diff --git a/iconvdata/gb2312.h b/iconvdata/gb2312.h index cde9375e84c..330d5e9b2a4 100644 --- a/iconvdata/gb2312.h +++ b/iconvdata/gb2312.h @@ -1,5 +1,5 @@ /* Access functions for GB2312 conversion. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -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";