hirokawa Sat Oct 25 06:29:10 2003 EDT
Modified files:
/php-src/ext/mbstring mbstring.c
Log:
encoding detection shouldn't be performed if mbstring.http_input is set to auto or
any valid encoding.
Index: php-src/ext/mbstring/mbstring.c
diff -u php-src/ext/mbstring/mbstring.c:1.202 php-src/ext/mbstring/mbstring.c:1.203
--- php-src/ext/mbstring/mbstring.c:1.202 Wed Oct 22 10:14:05 2003
+++ php-src/ext/mbstring/mbstring.c Sat Oct 25 06:29:07 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.202 2003/10/22 14:14:05 hirokawa Exp $ */
+/* $Id: mbstring.c,v 1.203 2003/10/25 10:29:07 hirokawa Exp $ */
/*
* PHP4 Multibyte String module "mbstring"
@@ -3354,6 +3354,10 @@
from_encoding = MBSTRG(http_input_identify);
}
+ if (from_encoding == mbfl_no_encoding_pass) {
+ return 0;
+ }
+
/* initialize string */
mbfl_string_init(&string);
mbfl_string_init(&result);
@@ -3395,6 +3399,19 @@
mbfl_encoding_detector *identd = NULL;
int size, *list;
+
+ if (MBSTRG(http_input_list_size) == 1 &&
+ MBSTRG(http_input_list)[0] == mbfl_no_encoding_pass) {
+ MBSTRG(http_input_identify) = mbfl_no_encoding_pass;
+ return SUCCESS;
+ }
+
+ if (MBSTRG(http_input_list_size) == 1 &&
+ MBSTRG(http_input_list)[0] != mbfl_no_encoding_auto &&
+ mbfl_no_encoding2name(MBSTRG(http_input_list)[0]) != NULL) {
+ MBSTRG(http_input_identify) = MBSTRG(http_input_list)[0];
+ return SUCCESS;
+ }
if (arg_list && strlen(arg_list)>0) {
/* make encoding list */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php