diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2014-02-13 11:54:52 +0900 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2014-02-13 11:54:52 +0900 |
commit | cbd108abf19d9fb9ae1d4ccd153215f56a2763e8 (patch) | |
tree | 8a0631208c010d7b4baab089d1a7e56d1f6e6d0e /tests | |
parent | 06bbfe1e2a46d6c2eaf74b7c576b09114ee2e670 (diff) | |
download | php-git-cbd108abf19d9fb9ae1d4ccd153215f56a2763e8.tar.gz |
Implement RFC https://wiki.php.net/rfc/default_encoding
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic/encoding.phpt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/basic/encoding.phpt b/tests/basic/encoding.phpt new file mode 100644 index 0000000000..b2ee5f3ca2 --- /dev/null +++ b/tests/basic/encoding.phpt @@ -0,0 +1,39 @@ +--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')); + +var_dump(ini_set('input_encoding', 'ISO-8859-1')); +var_dump(ini_set('internal_encoding', 'ISO-8859-1')); +var_dump(ini_set('output_encoding', 'ISO-8859-1')); +var_dump(ini_get('input_encoding')); +var_dump(ini_get('internal_encoding')); +var_dump(ini_get('output_encoding')); + +--EXPECTF-- +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) "" +string(10) "ISO-8859-1" +string(10) "ISO-8859-1" +string(10) "ISO-8859-1"
\ No newline at end of file |