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:
14
ext/standard/tests/strings/strtr3.phpt
Executable file
14
ext/standard/tests/strings/strtr3.phpt
Executable 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>€ ¤¢®à¥ âà ¢ , âà ¢¥ ¤à®¢ . #"
|
||||
Reference in New Issue
Block a user