Annotation of embedaddon/php/ext/standard/tests/strings/htmlentities16.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: htmlentities() test 16 (mbstring / cp1251)
! 3: --INI--
! 4: output_handler=
! 5: --SKIPIF--
! 6: <?php
! 7: extension_loaded("mbstring") or die("skip mbstring not available\n");
! 8: if (!@mb_internal_encoding('cp1251') ||
! 9: @htmlentities("\x88\xa9\xd2\xcf\xd3\xcb\xcf\xdb\xce\xd9\xca", ENT_QUOTES, '') == '') {
! 10: die("skip cp1251 character set is not available in this build.\n");
! 11: }
! 12: ?>
! 13: --FILE--
! 14: <?php
! 15: mb_internal_encoding('cp1251');
! 16: $str = "\x88\xa9\xf0\xee\xf1\xea\xee\xf8\xed\xfb\xe9";
! 17: var_dump(bin2hex($str), htmlentities($str, ENT_QUOTES, ''));
! 18: ?>
! 19: ===DONE===
! 20: --EXPECT--
! 21: string(22) "88a9f0eef1eaeef8edfbe9"
! 22: string(75) "€©роскошный"
! 23: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>