diff options
Diffstat (limited to 'Zend/zend_multibyte.c')
-rw-r--r-- | Zend/zend_multibyte.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Zend/zend_multibyte.c b/Zend/zend_multibyte.c index d7a444b32e..348d47f96f 100644 --- a/Zend/zend_multibyte.c +++ b/Zend/zend_multibyte.c @@ -994,11 +994,13 @@ static zend_encoding* zend_multibyte_find_script_encoding(zend_encoding *onetime return onetime_encoding; } - /* check out bom(byte order mark) and see if containing wchars */ - script_encoding = zend_multibyte_detect_unicode(TSRMLS_C); - if (script_encoding != NULL) { - /* bom or wchar detection is prior to 'script_encoding' option */ - return script_encoding; + if (CG(detect_unicode)) { + /* check out bom(byte order mark) and see if containing wchars */ + script_encoding = zend_multibyte_detect_unicode(TSRMLS_C); + if (script_encoding != NULL) { + /* bom or wchar detection is prior to 'script_encoding' option */ + return script_encoding; + } } /* if no script_encoding specified, just leave alone */ |