cvs: ZendEngine2 / zend.c
| From: | Andrei Zmievski | Date: | Fri, 15 Dec 2006 22:30:45 +0000 |
| Subject: | cvs: ZendEngine2 / zend.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5469@lists.php.net to get a copy of this message | ||
andrei Fri Dec 15 22:30:45 2006 UTC
Modified files:
/ZendEngine2 zend.c
Log:
Make utf8_conv stop on conversion errors when converting to UTF-16.
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend.c?r1=1.386&r2=1.387&diff_format=u
Index: ZendEngine2/zend.c
diff -u ZendEngine2/zend.c:1.386 ZendEngine2/zend.c:1.387
--- ZendEngine2/zend.c:1.386 Mon Dec 11 21:48:07 2006
+++ ZendEngine2/zend.c Fri Dec 15 22:30:44 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend.c,v 1.386 2006/12/11 21:48:07 andrei Exp $ */
+/* $Id: zend.c,v 1.387 2006/12/15 22:30:44 andrei Exp $ */
#include "zend.h"
#include "zend_extensions.h"
@@ -917,6 +917,7 @@
unicode_globals->http_input_encoding_conv = NULL;
unicode_globals->filesystem_encoding_conv = NULL;
zend_set_converter_encoding(&unicode_globals->utf8_conv, "UTF-8");
+ zend_set_converter_error_mode(unicode_globals->utf8_conv, ZEND_TO_UNICODE,
ZEND_CONV_ERROR_STOP);
zend_set_converter_encoding(&unicode_globals->ascii_conv, "US-ASCII");
zend_set_converter_error_mode(unicode_globals->ascii_conv, ZEND_FROM_UNICODE,
ZEND_CONV_ERROR_STOP);
unicode_globals->from_error_mode = ZEND_CONV_ERROR_SUBST;