[TYPO3-core] RFC: no more charset conversions for labels

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Dec 11 17:44:13 CET 2006


Hi!

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.

Masi
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: t3lib_div-LL.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061211/f5d265f8/attachment.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lang-LL.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061211/f5d265f8/attachment-0001.diff 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tslib_fe-LL.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061211/f5d265f8/attachment-0002.diff 


More information about the TYPO3-team-core mailing list