[TYPO3-dev] Your opinion about a possible bug in t3lib_cs

Martin Kutschker masi-no at spam-typo3.org
Tue Dec 9 20:43:19 CET 2008


Francois Suter schrieb:
> 
> So which answer is correct:
> 
> 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.

When I wrote the code with Kasper I had the opinion that if you call
t3lib_cs directly you have to use the expected/supported names. Maybe we
should have used constants instead of strings to make this clear.

Otherwise we would call the charset parsing routine for every single
call to any of t3lib_cs methods. I think it's called in the Core now too
often "just to make sure".

So my answer is: b)

Masi




More information about the TYPO3-dev mailing list