From: Moriyoshi Koizumi Date: Mon, 20 Dec 2010 03:11:41 +0000 (+0000) Subject: - Fix a bug that the script gets wrongly converted into UTF-8 when the script encodin... X-Git-Tag: php-5.4.0alpha1~191^2~480 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b09bb2129206d9df5775b29c659256ccb3b011a3;p=php - Fix a bug that the script gets wrongly converted into UTF-8 when the script encoding is not GL-safe. --- diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c index e112978bde..e3be53f41e 100644 --- a/Zend/zend_multibyte.c +++ b/Zend/zend_multibyte.c @@ -217,15 +217,11 @@ ZEND_API size_t zend_multibyte_script_encoding_filter(unsigned char **to, size_t ZEND_API size_t zend_multibyte_internal_encoding_filter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length TSRMLS_DC) { const zend_encoding *internal_encoding = zend_multibyte_get_internal_encoding(TSRMLS_C); - const zend_encoding *script_encoding = LANG_SCNG(script_encoding); if (!internal_encoding || !zend_multibyte_check_lexer_compatibility(internal_encoding)) { internal_encoding = zend_multibyte_encoding_utf8; } - if (!zend_multibyte_check_lexer_compatibility(script_encoding)) { - script_encoding = zend_multibyte_encoding_utf8; - } return zend_multibyte_encoding_converter(to, to_length, from, from_length, -script_encoding, internal_encoding TSRMLS_CC); +LANG_SCNG(script_encoding), internal_encoding TSRMLS_CC); } /*