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

Oliver Salzburg oliver.salzburg at googlemail.com
Fri May 25 23:35:27 CEST 2012


I also asked this question on SO if someone prefers that:
http://stackoverflow.com/questions/10761400/why-wont-my-extension-render-umlauts

I am working on an extension to display downloads on a website. You can
view the full, current source over on GitHub:
https://github.com/oliversalzburg/downloads

Given this piece of code in my controller:
$linkName = Tx_Downloads_Utility_Filename::construct( $download );
$download->setLinkText( $linkName );

This is where I want to set the label for a download. Sadly, when it is
later rendered, the result will be blank if $linkName contained an
umlaut (umlauts were just my test subject, the actual scope is unknown).

For debugging purposes, I have extended that section to look like this:

$linkName = Tx_Downloads_Utility_Filename::construct( $download );
$download->setLinkText( $linkName );
$this->flashMessages->add( "'" . strlen( $linkName ) . "'" );
$this->flashMessages->add( urlencode( $linkName ) );
$this->flashMessages->add( $linkName );

The resulting output of that is:
'24'
Text_File_S%C3_mething.jpg

Please note that no third flash message is rendered.

Umlauts are however rendered in other placed of the same Fluid template.
As can be seen in this screenshot: http://i.stack.imgur.com/kgfm9.png

The link field (between the image icon and the 31.06KB) is blank but
should say Text_File_Sömething.jpg. The string Sömething is rendered
perfectly fine in another place of the template.

Is the problem with my Fluid template?
https://github.com/oliversalzburg/downloads/blob/master/Resources/Private/Partials/List/Download.html

Cheers
Oliver


More information about the TYPO3-project-typo3v4mvc mailing list