From: Dmitry Stogov Date: Mon, 27 Mar 2006 14:37:14 +0000 (+0000) Subject: Test for strtr() with non-ascii encoding X-Git-Tag: RELEASE_1_3~227 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d1d9ce8fed631d9ecc8cdff3d14dc2ce950dbb1d;p=php Test for strtr() with non-ascii encoding --- diff --git a/ext/standard/tests/strings/strtr3.phpt b/ext/standard/tests/strings/strtr3.phpt new file mode 100755 index 0000000000..722e541516 --- /dev/null +++ b/ext/standard/tests/strings/strtr3.phpt @@ -0,0 +1,14 @@ +--TEST-- +strtr() function (windown-1251 encoding) +--INI-- +unicode.script_encoding=windows-1251 +unicode.output_encoding=windows-1251 +--FILE-- +"âà ¢ ", "âà ¢ "=>"¤à®¢ ", " "=>"€", "¯®¤ ­¨¬¨"=>"­  âà ¢¥"); +var_dump(strtr("#   ¤¢®à¥ ¤à®¢ , ¯®¤ ­¨¬¨ âà ¢ . #", $trans)); +?> +--EXPECT-- +string(35) "# € ¤¢®à¥ âà ¢ , ­  âà ¢¥ ¤à®¢ . #" +--UEXPECT-- +unicode(35) "# € ¤¢®à¥ âà ¢ , ­  âà ¢¥ ¤à®¢ . #"