[TYPO3-mvc] UPDATE Problems with Umlaute

Michael Knoll mimi at kaktusteam.de
Tue Jun 28 13:46:32 CEST 2011


Hello list (again),

is there any encoding happening to POST data when mapping this on domain 
model properties?

All Umlaute are working, if I map them directly from standard FLUID form 
to Extbase Domain objects.

If I'm doing this:

public function updateItemTitleAction(Tx_Yag_Domain_Model_Item $item, 
$itemTitle) {
	$item->setTitle($itemTitle);
	
	$this->itemRepository->update($item);
	
	$this->returnDataAndShutDown();
}

and $itemTitle comes from a Ajax call GET parameter, it is correctly 
encoded with utf-8 in my php script ( die($itemTitle) gives me a correct 
Umlaut-Encoding in Firebug), but it is not saved correctly in the database.

Any idea what I can do?

Thanks a lot

Mimi





Am 28.06.11 13:22, schrieb Michael Knoll:
> Hello list,
>
> we are having problems with umlaute. When sending a form from backend
> (which I suppose is UTF8), we get the correct string if I do a
> die($string) in my Controller.
>
> When I use the string so set my property on the domain object and save
> it to database, it is not saved as UTF8.
>
> If I manually change the property in the database and render the
> property in my FLUID template, I get a "?" instead of my Umlaut, no
> matter which coding I chose.
>
> My locale / language settings in TS look like this:
>
> config {
> // Character sets
> renderCharset = utf-8
> metaCharset = utf-8
>
> language = de
> locale_all = de_DE.UTF-8
> htmlTag_langKey = de
> }
>
>
> Here is a sample action in my controller:
>
> public function updateItemTitleAction(Tx_Yag_Domain_Model_Item $item,
> $itemTitle) {
> $item->setTitle($itemTitle);
>
> $this->itemRepository->update($item);
>
> $this->returnDataAndShutDown();
> }
>
>
> We use this action for an Ajax call - here non-utf8 chars are saved in
> the database.
>
> If we use a FLUID form and send it to the server, the string is "cut"
> before the Umlaut and only the beginning of the string is saved in the
> database.
>
>
> Any help is highly appreciated!
>
>
> Thanks in advance!
>
>
> Mimi



More information about the TYPO3-project-typo3v4mvc mailing list