[TYPO3-dev] Your opinion about a possible bug in t3lib_cs
Xavier Perseguers
typo3 at perseguers.ch
Tue Dec 9 00:01:10 CET 2008
Hi Francois,
> a) it's a bug, t3lib_cs::specCharsToASCII() (and quite a few other
> functions actually) should call t3lib_cs::parse_charset() (thus hiding
> the ugly details from the developer).
>
> b) it's the developer's responsibility to call t3lib_cs::parse_charset()
> himself before passing an encoding code to any of the t3lib_cs methods.
>
> The more I think about it, the more I suppose the correct answer is b),
> but it seems to me that a proper API would rather behave like a).
I think that b) is the best answer as nobody should be forced to loose
time with a useless call to parse_charset() (if the developer does his
job). But a note on this behaviour and a hint that parse_charset may be
useful should definitively be added to the PHP doc of specCharsToASCII()
and other funcs.
Just my opinion though...
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
More information about the TYPO3-dev
mailing list