[TYPO3-core] RFC: Fix Bug 6428 - strtoupper doesn't work with turkish i

Ernesto Baschny [cron IT] ernst at cron-it.de
Sun Oct 28 12:21:31 CET 2007


Martin Kutschker wrote: on 28.10.2007 12:15:
> Steffen Kamper schrieb:
>> This is a SVN patch request.
>>
>> Type: Bugfix
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=6428
>>
>> Branches: Trunk
>>
>> Problem:
>> when using turkish language the upper-conversion of char i fails.
>> Effect is that no Markers having char i will be replaced.
>>
>> Solution:
>> Using the Markers as they are solves the problem.
> 
> You code removes a strictly speaking unnecessary strtoupper() when
> creating the marker array. Is it possible for a hook to add contents to
> that array? If so it must be defined that the values are supposed to be
> in uuper case, which is a change in the behaviour. Otherwise the patch
> is probably correct.
> 
> But note that the whole templating system of TYPO3 has such a magic
> uppercasing feature for template markers. If you want to fix that too
> you must switch to the locale C before doing strtoupper() and switching
> back (other solution is tr/a..z/A..Z/).

A nice idea would be to have a t3lib_div::asciiToUpper($string) method
which will only handle 7bit characters but will ignore current locale
(doing tr/a..z/A..Z/ for example). I think there are many extensions
which do a strtoupper for internal purposes without thinking about the
implication with other locales. Even I didn't know about that
restriction in turkish. I thought a-z was "alphabetic" characters in all
languages. :)

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list