mirror of
https://github.com/php/php-src.git
synced 2024-10-16 14:02:37 +00:00
25 lines
706 B
PHP
25 lines
706 B
PHP
--TEST--
|
|
htmlentities() test 16 (mbstring / cp1251)
|
|
--INI--
|
|
output_handler=
|
|
--SKIPIF--
|
|
<?php
|
|
extension_loaded("mbstring") or die("skip mbstring not available\n");
|
|
if (!@mb_internal_encoding('cp1251') ||
|
|
@htmlentities("\x88\xa9\xd2\xcf\xd3\xcb\xcf\xdb\xce\xd9\xca", ENT_QUOTES, '') == '') {
|
|
die("skip cp1251 character set is not available in this build.\n");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
mb_internal_encoding('cp1251');
|
|
$str = b"\x88\xa9\xf0\xee\xf1\xea\xee\xf8\xed\xfb\xe9";
|
|
var_dump(bin2hex($str));
|
|
var_dump(htmlentities($str, ENT_QUOTES, ''));
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
unicode(22) "88a9f0eef1eaeef8edfbe9"
|
|
string(75) "€©роскошный"
|
|
===DONE===
|