2014-02-13 10:54:52 +08:00
|
|
|
--TEST--
|
|
|
|
PHP encoding setting test
|
|
|
|
--INI--
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
var_dump(ini_get('default_charset'));
|
|
|
|
var_dump(ini_get('input_encoding'));
|
|
|
|
var_dump(ini_get('internal_encoding'));
|
|
|
|
var_dump(ini_get('output_encoding'));
|
|
|
|
|
|
|
|
var_dump(ini_set('default_charset', 'ISO-8859-1'));
|
|
|
|
var_dump(ini_get('default_charset'));
|
|
|
|
var_dump(ini_get('input_encoding'));
|
|
|
|
var_dump(ini_get('internal_encoding'));
|
|
|
|
var_dump(ini_get('output_encoding'));
|
|
|
|
|
2015-02-03 17:20:18 +08:00
|
|
|
var_dump(ini_set('input_encoding', 'EUC-JP'));
|
|
|
|
var_dump(ini_set('internal_encoding', 'EUC-JP'));
|
|
|
|
var_dump(ini_set('output_encoding', 'EUC-JP'));
|
2014-02-13 10:54:52 +08:00
|
|
|
var_dump(ini_get('input_encoding'));
|
|
|
|
var_dump(ini_get('internal_encoding'));
|
|
|
|
var_dump(ini_get('output_encoding'));
|
|
|
|
|
2015-02-03 17:20:18 +08:00
|
|
|
--EXPECT--
|
2014-02-13 10:54:52 +08:00
|
|
|
string(5) "UTF-8"
|
|
|
|
string(0) ""
|
|
|
|
string(0) ""
|
|
|
|
string(0) ""
|
|
|
|
string(5) "UTF-8"
|
|
|
|
string(10) "ISO-8859-1"
|
|
|
|
string(0) ""
|
|
|
|
string(0) ""
|
|
|
|
string(0) ""
|
|
|
|
string(0) ""
|
|
|
|
string(0) ""
|
|
|
|
string(0) ""
|
2015-02-03 17:20:18 +08:00
|
|
|
string(6) "EUC-JP"
|
|
|
|
string(6) "EUC-JP"
|
|
|
|
string(6) "EUC-JP"
|