Re: default charset confusion

From: Date: Tue, 13 Mar 2012 14:21:33 +0000
Subject: Re: default charset confusion
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Am 13.03.2012, 02:34 Uhr, schrieb Rasmus Lerdorf <[email protected]>:
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

Thread (39 messages)

« previous php.internals (#58913) next »