File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / strings / bug20934.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:48:04 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
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(utf8_decode($str));
var_dump(utf8_decode(htmlspecialchars($str, ENT_COMPAT, "UTF-8")));
?>
--EXPECT--
string(2) "рс"
string(2) "рс"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>