From a87ab2a879638abe6e7b8a7ab04d30d6f80a46ec Mon Sep 17 00:00:00 2001 From: Andrei Zmievski Date: Fri, 15 Dec 2006 22:30:44 +0000 Subject: [PATCH] Make utf8_conv stop on conversion errors when converting to UTF-16. --- Zend/zend.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Zend/zend.c b/Zend/zend.c index 0d03f14626..0f8d08bdde 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -917,6 +917,7 @@ static void unicode_globals_ctor(zend_unicode_globals *unicode_globals TSRMLS_DC 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; -- 2.50.1