From: Andrei Zmievski Date: Fri, 15 Dec 2006 22:30:44 +0000 (+0000) Subject: Make utf8_conv stop on conversion errors when converting to UTF-16. X-Git-Tag: RELEASE_1_0_0RC1~691 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a87ab2a879638abe6e7b8a7ab04d30d6f80a46ec;p=php Make utf8_conv stop on conversion errors when converting to UTF-16. --- 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;