From 0cbd1b4c06fe3ff718371a347614733896ce9bfa Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Mon, 12 Mar 2012 06:22:45 +0000 Subject: [PATCH] Clarify this git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@324125 c90b9560-bf6c-de11-be94-00142212c4b1 --- appendices/migration54.xml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/appendices/migration54.xml b/appendices/migration54.xml index 39f12771d4..8c8b882ed3 100644 --- a/appendices/migration54.xml +++ b/appendices/migration54.xml @@ -1349,11 +1349,18 @@ - The default character set is now UTF-8, instead of ISO-8859-1, - when the default_charset configuration setting is not set - ("", which is the default). This applies to functions such as htmlentities and - htmlspecialchars, or any code that relies on determine_charset(NULL) - internally. + The default character set for htmlspecialchars + and htmlentities is now UTF-8, + instead of ISO-8859-1. Note that changing your output + charset via the default_charset + configuration setting does not affect htmlspecialchars/htmlentities unless + you are passing "" (an empty string) as the encoding parameter to your + htmlspecialchars/htmlentities calls. + Generally we do not recommend doing this because you should be able to + change your output charset without affecting the runtime charset used by + these functions. The safest approach is to explicitly set the charset on + each call to htmlspecialchars and + htmlentities.