[TYPO3-core] RFC #10838: t3lib_cs->utf8_decode() does not check whether the target charset is utf8
Xavier Perseguers
typo3 at perseguers.ch
Fri Apr 3 13:06:58 CEST 2009
Hi,
>> Solution:
>> A simple check for the target charset being utf8 solves the problem, the
>> string can then be returned as is.
>
> I propose to change:
>
> if ($charset === 'utf-8') return $str;
>
> to:
>
> if (strcasecmp($charset, 'utf-8') === 0) {
> return $str;
> }
>
> Reasons:
> - conforms to CGL
> - case-insensitive comparison
I agree, +1 with this change.
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
More information about the TYPO3-team-core
mailing list