mirror of
https://github.com/php/php-src.git
synced 2024-10-17 14:32:37 +00:00
8f9acfedb3
(patch by komura, thanks!)
21 lines
565 B
PHP
21 lines
565 B
PHP
--TEST--
|
|
Bug #49536 (mb_detect_encoding() returns incorrect results when strict_mode is turned on)
|
|
--SKIPIF--
|
|
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
|
--FILE--
|
|
<?php
|
|
// non-strict mode
|
|
var_dump(mb_detect_encoding("A\x81", "SJIS", false));
|
|
// strict mode
|
|
var_dump(mb_detect_encoding("A\x81", "SJIS", true));
|
|
// non-strict mode
|
|
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", false));
|
|
// strict mode
|
|
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", true));
|
|
?>
|
|
--EXPECT--
|
|
string(4) "SJIS"
|
|
bool(false)
|
|
string(5) "UTF-8"
|
|
bool(false)
|