From c4c97d878dc268bd0d0f34bb0d40cf68462a70ec Mon Sep 17 00:00:00 2001 From: Yasuo Ohgaki Date: Tue, 18 Mar 2014 05:45:01 +0900 Subject: [PATCH] Update UPGRADING. Add more descriptions about default_charset and encoding related changes. Many thanks to Christopher. --- UPGRADING | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/UPGRADING b/UPGRADING index 80d001cc22..ac31e80044 100755 --- a/UPGRADING +++ b/UPGRADING @@ -161,6 +161,17 @@ PHP 5.6 UPGRADE NOTES - Deprecated PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, an undocument constant effectively equivalent to PDO::ATTR_EMULATE_PREPARES. +- Deprecated INIs: Following INIs are deprecated in favor of new + internal_encoding/input_encoding/output_encoding. Refer to "Changes to + encodings in PHP 5.6" in "11. Other Changes" section for more details. + + iconv.input_encoding + iconv.ouput_encoding + iconv.internal_encoding + mbstring.http_input + mbstring.http_output + mbstring.internal_encoding + ======================================== 4. Changed Functions ======================================== @@ -335,6 +346,14 @@ PHP 5.6 UPGRADE NOTES enabled and to recognize the value -1 for never populating the global $HTTP_RAW_POST_DATA variable, which will be default in future PHP versions. + default_charset is set to UTF-8. It was empty previously. default_charset + is used where it is applicable. Iconv/Mbstring/htmlentities/htmlspecialchars/ + html_entity_decode use default_charset as default encoding. + + internal_encoding/input_encoding/output_encoding is added for encoding + handling modules. Refer to "Changes to encodings in PHP 5.6" in "11. Other Changes" + section for more details. + - cURL: If the new openssl.cafile ini directive is specified ext/curl will give the openssl path precedence over its own curl.cainfo directive. @@ -362,3 +381,43 @@ PHP 5.6 UPGRADE NOTES - Zip: New --with-libzip option allow to use system libzip. Version > 0.11 required, Version >= 0.11.2 recommended for all features. + +- Changes to encodings in PHP 5.6 + The default value of default_charset is now UTF-8 when it is not + explicitly set in php.ini + + The following php.ini parameters were added: + internal_encoding + input_encoding + output_encoding + + The values of the following php.ini parameters have become empty in + PHP 5.6 (previosuly they were all ISO-8859-1) + + iconv.input_encoding + iconv.ouput_encoding + iconv.internal_encoding + + Changes were made to character set handling in: + - the iconv and mbstring extensions, + - and htmlentities(), htmlspecialchars(), html_entity_decode() functions + + The precedence for these is now: + + default_charset < internal/input/output_encoding < (mbstring.* || iconv.*) < function parameter + + For example, the easiest way to use the UTF-8 encoding is to set + default_charset=UTF-8 and leave the following php.ini parameters + + empty: + + iconv.input_encoding + iconv.ouput_encoding + iconv.internal_encoding + mbstring.http_input + mbstring.http_output + mbstring.internal_encoding + internal_encoding + input_encoding + output_encoding + -- 2.40.0