[TYPO3-core] RFC: no more charset conversions for labels
Martin.Kutschker at n0spam-blackbox.net
Wed Dec 13 09:58:02 CET 2006
Martin Kutschker schrieb:
> Currently there are two locallang file formats: PHP and XML. When read
> the labels are always held in memory in the language charset. This means
> extra conversion every time when the current charset does not match the
> language charset (eg forceCharset is set).
> To solve this issue I have changed t3lib_div::readLLfile() so that it
> returns the labels in forceCharset when set. This means there is no
> origCharset or labelCharset in $LANG and $TSFE.
> readLLfile() now stores the strings in the requested charset (not the
> original charset). As a further optimization it stored only the default
> language and the requested language in the cache file.
> I don't know if readLLfile() is meant to be a real public API. I don't
> think so, and have therefore changed it's behaviour. If it's a problem I
> could add an optional $charset parameter.
> Note that there is a setting which still does not benefit from the
> patch. That is when you have set a config.renderCharset that is
> different from forceCharset. To resolve those issue I could make TSFE
> use the mentioned charset parameter.
I had hoped to get this into beta2.
If you want to test: simply install and use with various setups with and
without forcetCharset (also other than utf8!).
If you oppose the "API change" of readLLfile() (returns current charset
instead of language charset) then please say so (better now than tomorrow).
I have currently some time to work on this.
More information about the TYPO3-team-core