summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests/zend_multibyte-05.phpt
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2008-07-24 22:21:41 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2008-07-24 22:21:41 +0000
commit4f42ed39c0c955b724051c2b27d69cd8c3ceacdd (patch)
tree7e654c45e5c7e39a24983f81954d8ef6b67a50e6 /ext/mbstring/tests/zend_multibyte-05.phpt
parent1f845199f79d4fd87074e1dfd4e236207e1bc1c2 (diff)
downloadphp-git-4f42ed39c0c955b724051c2b27d69cd8c3ceacdd.tar.gz
- Revived zend multibyte
Diffstat (limited to 'ext/mbstring/tests/zend_multibyte-05.phpt')
-rw-r--r--ext/mbstring/tests/zend_multibyte-05.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/mbstring/tests/zend_multibyte-05.phpt b/ext/mbstring/tests/zend_multibyte-05.phpt
new file mode 100644
index 0000000000..4b1d84df9a
--- /dev/null
+++ b/ext/mbstring/tests/zend_multibyte-05.phpt
@@ -0,0 +1,20 @@
+--TEST--
+zend multibyte (5)
+--SKIP--
+<?php
+ini_set("mbstring.script_encoding", "SJIS");
+ini_set("mbstring.script_encoding", "***") != "SJIS" or
+ die("skip zend-multibyte is not available");
+?>
+--INI--
+mbstring.script_encoding=EUC-JP
+mbstring.internal_encoding=UTF-8
+--FILE--
+<?php
+// forcefully interpret an UTF-8 encoded string as EUC-JP and then convert it
+// back to UTF-8. There should be only a pair of consecutive bytes that is
+// valid EUC-encoded character "鴻".
+var_dump(bin2hex("テスト"));
+?>
+--EXPECT--
+string(16) "3f3f3fe9b4bb3f3f"