Browse Source

Test for strtr() with non-ascii encoding

migration/RELEASE_1_0_0
Dmitry Stogov 20 years ago
parent
commit
d1d9ce8fed
  1. 14
      ext/standard/tests/strings/strtr3.phpt

14
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--
<?php
$trans = array("¤à®¢ "=>"âà ¢ ", "âà ¢ "=>"¤à®¢ ", " "=>"€", "¯®¤ ­¨¬¨"=>"­  âà ¢¥");
var_dump(strtr("# �  ¤¢®à¥ ¤à®¢ , ¯®¤ ­¨¬¨ âà ¢ . #", $trans));
?>
--EXPECT--
string(35) "# �€ ¤¢®à¥ âà ¢ , ­  âà ¢¥ ¤à®¢ . #"
--UEXPECT--
unicode(35) "# �€ ¤¢®à¥ âà ¢ , ­  âà ¢¥ ¤à®¢ . #"
Loading…
Cancel
Save