Annotation of embedaddon/php/ext/standard/tests/strings/bug20934.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #20934 (htmlspecialchars returns latin1 from UTF-8)
! 3: --SKIPIF--
! 4: <?php
! 5: if (!function_exists("utf8_encode") || !function_exists("utf8_decode")) {
! 6: die("SKIP Neither utf8_encode() nor utf8_decode() are available");
! 7: }
! 8: ?>
! 9: --FILE--
! 10: <?php
! 11: $str = utf8_encode("\xe0\xe1");
! 12: var_dump(utf8_decode($str));
! 13: var_dump(utf8_decode(htmlspecialchars($str, ENT_COMPAT, "UTF-8")));
! 14: ?>
! 15: --EXPECT--
! 16: string(2) "рс"
! 17: string(2) "рс"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>