[TYPO3-mvc] Why won't my extender render umlauts?

Oliver Salzburg oliver.salzburg at googlemail.com
Sat May 26 19:24:04 CEST 2012


On 2012-05-26 18:12, Bastian Waidelich wrote:
> Bastian Waidelich wrote:
>> Oliver Salzburg wrote:
> 
>> Maybe the reason is, because you remove special characters in your
>> clean() method  [...]
> 
> Again, a bit more detailed (as on SO):
> 
> you call Tx_Downloads_Utility_Filename::construct($linkName) which (by
> default) calls Tx_Downloads_Utility_Filename::clean($linkName) which
> again removes all the special characters by replacing anything that
> doesn't match the regex pattern /([[:alnum:]_\.-]*)/ by underscores.
> There seems to be a problem with encoding (maybe your db is not set to
> UTF-8 encoding) so Text_File_Sömething is actually turned into
> Text_File_Sömething and the clean() method turns that into an invalid
> string. try using utf8_encode() on the $filename first.
> 

Thanks again for your help.
I did not expect that method to be the issue as it seemed stable
throughout the development process.

I am now using iconv( "utf-8", "ascii//TRANSLIT", $filename ); as the
first step in the cleaning process. This solved the issue instantly.

Thanks again and kind regards
Oliver


More information about the TYPO3-project-typo3v4mvc mailing list