1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00

Test for strtr() with non-ascii encoding

This commit is contained in:
Dmitry Stogov
2006-03-27 14:37:14 +00:00
parent 9d9adb2f35
commit d1d9ce8fed

View File

@@ -0,0 +1,14 @@
--TEST--
strtr() function (windown-1251 encoding)
--INI--
unicode.script_encoding=windows-1251
unicode.output_encoding=windows-1251
--FILE--
<?php
$trans = array("¤à®¢ "=>"âà ¢ ", "âà ¢ "=>"¤à®¢ ", " "=>"€", "¯®¤ ­¨¬¨"=>"­  âà ¢¥");
var_dump(strtr("# <20>  ¤¢®à¥ ¤à®¢ , ¯®¤ ­¨¬¨ âà ¢ . #", $trans));
?>
--EXPECT--
string(35) "# <20>€ ¤¢®à¥ âà ¢ , ­  âà ¢¥ ¤à®¢ . #"
--UEXPECT--
unicode(35) "# <20>€ ¤¢®à¥ âà ¢ , ­  âà ¢¥ ¤à®¢ . #"