Bug #60884 [ReO->Csd]: htmlentities() behaves differently and thus breaks existing code

From: Date: Fri, 27 Jan 2012 10:00:22 +0000
Subject: Bug #60884 [ReO->Csd]: htmlentities() behaves differently and thus breaks existing code
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7873@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60884&edit=1 ID: 60884 Updated by: aharvey@php.net Reported by: t dot nickl at exse dot de Summary: htmlentities() behaves differently and thus breaks existing code -Status: Re-Opened +Status: Closed Type: Bug Package: Documentation problem Operating System: CentOS 4.4 PHP Version: 5.4.0RC6 -Assigned To: +Assigned To: aharvey Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2012-01-27 10:00:16] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=322842 Log: Fix doc bug #60884 (htmlentities() behaves differently and thus breaks existing code) by clarifying the new behaviour in PHP 5.4.0. ------------------------------------------------------------------------ [2012-01-26 23:00:03] sixd@php.net Re-opening as a Doc bug. The htmlentities doc needs to be clearer about this. Its "this default is very likely to change" text is outdated. ------------------------------------------------------------------------ [2012-01-26 09:18:09] t dot nickl at exse dot de @johannes@php.net: Setting default_charset to latin1 does not work. Empty string is still outputted when calling htmlentities with only one argument. Your copy&paste preamble does not help, changing the meaning of the written code is a bug, don't worry. @rasmus@php.net: Thank you, I sadly will change every htmlentities($a) to htmlentities($a,NULL,'') before deploying php5.4. ------------------------------------------------------------------------ [2012-01-25 22:52:52] rasmus@php.net I know it hurts, but we really need to move away from ISO-8859-1 and towards UTF-8 as the default charset of the Web. We have chosen to take the hit in 5.4. The documentation has carried a warning about this impending change for quite a while urging people to specify a charset. For PHP 5.4 compatibility Typo3 should either hardcode iso-8859-1 or they should change their calls to: htmlentities($a,NULL,'') to pick up the default script-encoding charset. ------------------------------------------------------------------------ [2012-01-25 18:01:23] johannes@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php In PHP 5.4 the default_charset php.ini option was set to utf-8. You can override this in php.ini or .htaccess or such. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60884 -- Edit this bug report at https://bugs.php.net/bug.php?id=60884&edit=1

« previous php.doc.bugs (#7873) next »