php-src/Zend/tests/multibyte/multibyte_encoding_001.phpt

25 lines
517 B
Plaintext
Raw Normal View History

2008-03-23 13:38:20 +00:00
--TEST--
Zend Multibyte and ShiftJIS
--SKIPIF--
<?php
2010-12-25 01:42:45 +00:00
if (!in_array("zend.detect_unicode", array_keys(ini_get_all()))) {
2008-03-23 13:38:20 +00:00
die("skip Requires configure --enable-zend-multibyte option");
}
if (!extension_loaded("mbstring")) {
die("skip Requires mbstring extension");
}
?>
--INI--
zend.multibyte=1
2008-03-23 13:38:20 +00:00
mbstring.internal_encoding=SJIS
--FILE--
<?php
declare(encoding='Shift_JIS');
$s = "<22>\"; // 0x95+0x5c in script, not somewhere else "
printf("%x:%x\n", ord($s[0]), ord($s[1]));
?>
===DONE===
--EXPECT--
95:5c
===DONE===