php-src/ext/standard/tests/strings/bug20934.phpt
Steph Fox 87fac43ac0 - killed off UEXPECT
- html_translation_table and setlocale tests are no longer relevant
- there are a number of ANSI-encoded files. Is this deliberate?
2008-05-27 10:50:48 +00:00

18 lines
458 B
PHP

--TEST--
Bug #20934 (htmlspecialchars returns latin1 from UTF-8)
--SKIPIF--
<?php
if (!function_exists("utf8_encode") || !function_exists("utf8_decode")) {
die("SKIP Neither utf8_encode() nor utf8_decode() are available");
}
?>
--FILE--
<?php
$str = utf8_encode("\xe0\xe1");
var_dump(bin2hex((binary)utf8_decode($str)));
var_dump(bin2hex((binary)utf8_decode(htmlspecialchars($str, ENT_COMPAT, "UTF-8"))));
?>
--EXPECT--
unicode(4) "e0e1"
unicode(4) "e0e1"