summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2014-02-13 11:56:54 +0900
committerYasuo Ohgaki <yohgaki@php.net>2014-02-13 11:56:54 +0900
commit9a5cb51ebcb778b0cac39928fb6fcd5c604fe6cd (patch)
tree196bec3fad7cd0e8f2a26bc298b803d2383d0f58 /tests
parentc9e9151bb3c5bc2e257a9e23d53b6f0234aac743 (diff)
parentcbd108abf19d9fb9ae1d4ccd153215f56a2763e8 (diff)
downloadphp-git-9a5cb51ebcb778b0cac39928fb6fcd5c604fe6cd.tar.gz
Merge branch 'PHP-5.6'
* PHP-5.6: Implement RFC https://wiki.php.net/rfc/default_encoding
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/encoding.phpt39
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