]> granicus.if.org Git - php/commitdiff
Update UPGRADING.
authorYasuo Ohgaki <yohgaki@php.net>
Mon, 17 Mar 2014 20:45:01 +0000 (05:45 +0900)
committerYasuo Ohgaki <yohgaki@php.net>
Mon, 17 Mar 2014 20:49:09 +0000 (05:49 +0900)
Add more descriptions about default_charset and encoding related changes.
Many thanks to Christopher.

UPGRADING

index 80d001cc226dde6c73837c783878544f211b2a27..ac31e800440695b94aec6681d619bdb4bd84ad8e 100755 (executable)
--- 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
+