cvs: php4 /ext/mbstring mbfilter.c unicode_table.h
| From: | Rui Hirokawa | Date: | Sun, 05 May 2002 11:42:19 +0000 |
| Subject: | cvs: php4 /ext/mbstring mbfilter.c unicode_table.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11707@lists.php.net to get a copy of this message | ||
hirokawa Sun May 5 07:42:19 2002 EDT
Modified files:
/php4/ext/mbstring mbfilter.c unicode_table.h
Log:
bug fixed in unicode -> cp1252 table.
Index: php4/ext/mbstring/mbfilter.c
diff -u php4/ext/mbstring/mbfilter.c:1.25 php4/ext/mbstring/mbfilter.c:1.26
--- php4/ext/mbstring/mbfilter.c:1.25 Sat May 4 22:22:36 2002
+++ php4/ext/mbstring/mbfilter.c Sun May 5 07:42:18 2002
@@ -79,7 +79,7 @@
*
*/
-/* $Id: mbfilter.c,v 1.25 2002/05/05 02:22:36 hirokawa Exp $ */
+/* $Id: mbfilter.c,v 1.26 2002/05/05 11:42:18 hirokawa Exp $ */
#ifdef HAVE_CONFIG_H
@@ -1684,8 +1684,8 @@
mbfl_filt_conv_common_flush };
static struct mbfl_convert_vtbl vtbl_wchar_cp1252 = {
- mbfl_no_encoding_cp1252,
mbfl_no_encoding_wchar,
+ mbfl_no_encoding_cp1252,
mbfl_filt_conv_common_ctor,
mbfl_filt_conv_common_dtor,
mbfl_filt_conv_wchar_cp1252,
@@ -4537,9 +4537,9 @@
if (c >= 0x100) {
/* look it up from the cp1252 table */
s = -1;
- n = 30;
+ n = 31;
while (n >= 0) {
- if (c == cp1252_ucs_table[n]) {
+ if (c == cp1252_ucs_table[n] && c != 0xfffe) {
s = 0x80 + n;
break;
}
Index: php4/ext/mbstring/unicode_table.h
diff -u php4/ext/mbstring/unicode_table.h:1.1 php4/ext/mbstring/unicode_table.h:1.2
--- php4/ext/mbstring/unicode_table.h:1.1 Thu Mar 7 12:28:50 2002
+++ php4/ext/mbstring/unicode_table.h Sun May 5 07:42:18 2002
@@ -16,10 +16,10 @@
* This table differs from the rest of the unicode tables below
* as it only covers this range, while the rest cover 0xa0 onwards */
static const unsigned short cp1252_ucs_table[] = {
- 0xfffe,0xfffe,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,
- 0x02c6,0x2030,0x0160,0x2039,0x0152,0xfffe,0xfffe,0xfffe,
- 0xfffe,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x02dc,
- 0x2122,0x0161,0x203a,0x0153,0xfffe,0xfffe,0x0178
+ 0x20ac,0xfffe,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,
+ 0x02c6,0x2030,0x0160,0x2039,0x0152,0xfffe,0x017d,0xfffe,
+ 0xfffe,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x2014,
+ 0x02dc,0x2122,0x0161,0x203a,0x0153,0xfffe,0x017e,0x0178
};