]> granicus.if.org Git - php/commitdiff
- MFH Add tests
authorMarcus Boerger <helly@php.net>
Sun, 23 Mar 2008 13:38:20 +0000 (13:38 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 23 Mar 2008 13:38:20 +0000 (13:38 +0000)
Zend/tests/multibyte/multibyte_encoding_001.phpt [new file with mode: 0755]

diff --git a/Zend/tests/multibyte/multibyte_encoding_001.phpt b/Zend/tests/multibyte/multibyte_encoding_001.phpt
new file mode 100755 (executable)
index 0000000..19b6064
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Zend Multibyte and ShiftJIS
+--SKIPIF--
+<?php
+if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
+  die("skip Requires configure --enable-zend-multibyte option");
+}
+if (!extension_loaded("mbstring")) {
+  die("skip Requires mbstring extension");
+}
+?>
+--INI--
+mbstring.internal_encoding=SJIS
+--FILE--
+<?php
+declare(encoding='Shift_JIS');
+$s = "\95\"; // 0x95+0x5c in script, not somewhere else "
+printf("%x:%x\n", ord($s[0]), ord($s[1]));
+?>
+===DONE===
+--EXPECT--
+95:5c
+===DONE===