Am 13.03.2012, 02:34 Uhr, schrieb Rasmus Lerdorf <ras...@lerdorf.com>:
On 03/12/2012 05:52 PM, Yasuo Ohgaki wrote:
I always set all parameters for htmlentities/htmlspecialchars, therefore
I haven't noticed this was changed from 5.3. They may be migrating from
5.2 or older. (RHEL5 uses 5.1)

No, like I showed, moving from 5.3 to 5.4 breaks because the new default
UTF-8 encoding validates the input and 8859-1 in 5.3 does not. So for
charsets that are actually safe for the low-ascii chars that are
significant to html htmlspecialchars() now returns false in 5.4 because
their chars fail the UTF8 validity check. For people who explicitly set
all the parameters nothing has changed, of course.

I second that. It causes us big PITA because we're still using 8859-1 (shame on us) and it is made even worse because the encoding parameter is after the
(optional) flags parameter which now has to be given too.

The sane version from my naive point of view would be to honor default_charset if nothing is given. That's what I expected when I read the migration guide.

- Chris

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to