moriyoshi Tue Feb 24 15:09:43 2009 UTC
Removed files: (Branch: PHP_5_2)
/php-src/ext/mbstring/tests illformed_utf_sequences.phpt
Modified files:
/php-src/ext/mbstring/libmbfl/filters mbfilter_utf32.c
mbfilter_utf8.c
/php-src/ext/mbstring/libmbfl/mbfl mbfl_consts.h
Log:
- Revert the patch then.
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_utf32.c?r1=1.1.8.1&r2=1.1.8.2&diff_format=u
Index: php-src/ext/mbstring/libmbfl/filters/mbfilter_utf32.c
diff -u php-src/ext/mbstring/libmbfl/filters/mbfilter_utf32.c:1.1.8.1
php-src/ext/mbstring/libmbfl/filters/mbfilter_utf32.c:1.1.8.2
--- php-src/ext/mbstring/libmbfl/filters/mbfilter_utf32.c:1.1.8.1 Tue Feb
24 13:22:47 2009
+++ php-src/ext/mbstring/libmbfl/filters/mbfilter_utf32.c Tue Feb 24
15:09:42 2009
@@ -171,9 +171,7 @@
CK((*filter->output_function)(0xfeff, filter->data));
} else {
filter->status &= ~0xff;
- if (n < MBFL_WCSPLANE_UTF32MAX && (n < 0xd800 || n >
0xdfff)) {
- CK((*filter->output_function)(n, filter->data));
- }
+ CK((*filter->output_function)(n, filter->data));
}
break;
}
@@ -203,9 +201,7 @@
} else {
filter->status = 0;
n = (c & 0xff) | filter->cache;
- if (n < MBFL_WCSPLANE_UTF32MAX && (n < 0xd800 || n > 0xdfff)) {
- CK((*filter->output_function)(n, filter->data));
- }
+ CK((*filter->output_function)(n, filter->data));
}
return c;
}
@@ -215,7 +211,7 @@
*/
int mbfl_filt_conv_wchar_utf32be(int c, mbfl_convert_filter *filter)
{
- if (c >= 0 && c < MBFL_WCSPLANE_UTF32MAX) {
+ if (c >= 0 && c < MBFL_WCSGROUP_UCS4MAX) {
CK((*filter->output_function)((c >> 24) & 0xff, filter->data));
CK((*filter->output_function)((c >> 16) & 0xff, filter->data));
CK((*filter->output_function)((c >> 8) & 0xff, filter->data));
@@ -251,9 +247,7 @@
} else {
filter->status = 0;
n = ((c & 0xff) << 24) | filter->cache;
- if (n < MBFL_WCSPLANE_UTF32MAX && (n < 0xd800 || n > 0xdfff)) {
- CK((*filter->output_function)(n, filter->data));
- }
+ CK((*filter->output_function)(n, filter->data));
}
return c;
}
@@ -263,7 +257,7 @@
*/
int mbfl_filt_conv_wchar_utf32le(int c, mbfl_convert_filter *filter)
{
- if (c >= 0 && c < MBFL_WCSPLANE_UTF32MAX) {
+ if (c >= 0 && c < MBFL_WCSGROUP_UCS4MAX) {
CK((*filter->output_function)(c & 0xff, filter->data));
CK((*filter->output_function)((c >> 8) & 0xff, filter->data));
CK((*filter->output_function)((c >> 16) & 0xff, filter->data));
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/filters/mbfilter_utf8.c?r1=1.1.8.1&r2=1.1.8.2&diff_format=u
Index: php-src/ext/mbstring/libmbfl/filters/mbfilter_utf8.c
diff -u php-src/ext/mbstring/libmbfl/filters/mbfilter_utf8.c:1.1.8.1
php-src/ext/mbstring/libmbfl/filters/mbfilter_utf8.c:1.1.8.2
--- php-src/ext/mbstring/libmbfl/filters/mbfilter_utf8.c:1.1.8.1 Tue Feb
24 13:22:47 2009
+++ php-src/ext/mbstring/libmbfl/filters/mbfilter_utf8.c Tue Feb 24
15:09:42 2009
@@ -106,8 +106,7 @@
}
filter->status = 0;
} else if (c < 0xc0) {
- int status = filter->status & 0xff;
- switch (status) {
+ switch (filter->status & 0xff) {
case 0x10: /* 2byte code 2nd char */
case 0x21: /* 3byte code 3rd char */
case 0x32: /* 4byte code 4th char */
@@ -115,11 +114,7 @@
case 0x54: /* 6byte code 6th char */
filter->status = 0;
s = filter->cache | (c & 0x3f);
- if ((status == 0x10 && s >= 0x80) ||
- (status == 0x21 && s >= 0x800 && (s < 0xd800 || s >
0xdfff)) ||
- (status == 0x32 && s >= 0x10000) ||
- (status == 0x43 && s >= 0x200000) ||
- (status == 0x54 && s >= 0x4000000 && s <
MBFL_WCSGROUP_UCS4MAX)) {
+ if (s >= 0x80) {
CK((*filter->output_function)(s, filter->data));
}
break;
http://cvs.php.net/viewvc.cgi/php-src/ext/mbstring/libmbfl/mbfl/mbfl_consts.h?r1=1.3.4.1&r2=1.3.4.2&diff_format=u
Index: php-src/ext/mbstring/libmbfl/mbfl/mbfl_consts.h
diff -u php-src/ext/mbstring/libmbfl/mbfl/mbfl_consts.h:1.3.4.1
php-src/ext/mbstring/libmbfl/mbfl/mbfl_consts.h:1.3.4.2
--- php-src/ext/mbstring/libmbfl/mbfl/mbfl_consts.h:1.3.4.1 Tue Feb 24
13:22:47 2009
+++ php-src/ext/mbstring/libmbfl/mbfl/mbfl_consts.h Tue Feb 24 15:09:43 2009
@@ -47,7 +47,6 @@
/* wchar plane, special charactor */
#define MBFL_WCSPLANE_MASK 0xffff
#define MBFL_WCSPLANE_UCS2MAX 0x00010000
-#define MBFL_WCSPLANE_UTF32MAX 0x00110000
#define MBFL_WCSPLANE_SUPMIN 0x00010000
#define MBFL_WCSPLANE_SUPMAX 0x00200000
#define MBFL_WCSPLANE_JIS0208 0x70e10000 /* JIS HEX :
2121h - 7E7Eh */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php