mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
163 lines
7.2 KiB
PHP
163 lines
7.2 KiB
PHP
--TEST--
|
|
Bug #48645 (mb_convert_encoding() doesn't understand hexadecimal html-entities)
|
|
--SKIPIF--
|
|
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
|
|
--FILE--
|
|
<?php
|
|
var_dump(bin2hex(mb_convert_encoding("�", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("	", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("
", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("
", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("
", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("
", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#x/;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#x:;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#x@;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#x`;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#xG;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#xg;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#x;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("�", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("	", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("
", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("
", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("
", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("
", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#X/;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#X:;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#X@;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#X`;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#XG;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#Xg;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#X;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("�", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("	", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#/;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#:;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("&#;", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("�", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("�", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
|
|
var_dump(bin2hex(mb_convert_encoding("�", "UTF-8", "HTML-ENTITIES")));
|
|
?>
|
|
--EXPECT--
|
|
string(2) "00"
|
|
string(2) "01"
|
|
string(2) "02"
|
|
string(2) "03"
|
|
string(2) "04"
|
|
string(2) "05"
|
|
string(2) "06"
|
|
string(2) "07"
|
|
string(2) "08"
|
|
string(2) "09"
|
|
string(2) "0a"
|
|
string(2) "0b"
|
|
string(2) "0c"
|
|
string(2) "0d"
|
|
string(2) "0e"
|
|
string(2) "0f"
|
|
string(2) "0a"
|
|
string(2) "0b"
|
|
string(2) "0c"
|
|
string(2) "0d"
|
|
string(2) "0e"
|
|
string(2) "0f"
|
|
string(10) "2623782f3b"
|
|
string(10) "2623783a3b"
|
|
string(10) "262378403b"
|
|
string(10) "262378603b"
|
|
string(10) "262378473b"
|
|
string(10) "262378673b"
|
|
string(8) "2623783b"
|
|
string(2) "00"
|
|
string(2) "01"
|
|
string(2) "02"
|
|
string(2) "03"
|
|
string(2) "04"
|
|
string(2) "05"
|
|
string(2) "06"
|
|
string(2) "07"
|
|
string(2) "08"
|
|
string(2) "09"
|
|
string(2) "0a"
|
|
string(2) "0b"
|
|
string(2) "0c"
|
|
string(2) "0d"
|
|
string(2) "0e"
|
|
string(2) "0f"
|
|
string(2) "0a"
|
|
string(2) "0b"
|
|
string(2) "0c"
|
|
string(2) "0d"
|
|
string(2) "0e"
|
|
string(2) "0f"
|
|
string(10) "2623582f3b"
|
|
string(10) "2623583a3b"
|
|
string(10) "262358403b"
|
|
string(10) "262358603b"
|
|
string(10) "262358473b"
|
|
string(10) "262358673b"
|
|
string(8) "2623583b"
|
|
string(2) "00"
|
|
string(2) "01"
|
|
string(2) "02"
|
|
string(2) "03"
|
|
string(2) "04"
|
|
string(2) "05"
|
|
string(2) "06"
|
|
string(2) "07"
|
|
string(2) "08"
|
|
string(2) "09"
|
|
string(8) "26232f3b"
|
|
string(8) "26233a3b"
|
|
string(6) "26233b"
|
|
string(8) "f48fbfbf"
|
|
string(20) "2623783131303030303b"
|
|
string(8) "f48fbfbf"
|
|
string(20) "2623583131303030303b"
|
|
string(8) "f48fbfbf"
|
|
string(20) "2623313131343131323b"
|