[TYPO3-dev] FlexForms and utf-8

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Jan 16 15:41:02 CET 2006


Thomas Hempel schrieb:
> Hi Elmar,
> 
>> This is my full answer:
>>
>> With good coding style you shouldn't have output strings in flexforms 
>> at all,
>> but allways get the labels to translation files. Then you only have 
>> english
>> letters in flexforms and no problem anyhow.
> 
> Of course! he problem is...
> I have a select box where the user can select from a list on the right 
> to a list on the left. The items in the right list came directly from 
> the database which has an utf-8 encoding. In that list, everything is 
> fine and the special characters are displayed correct.
> If the user selects one item and copies it into the left list, 
> everything is displayed corect until he saves the form. Than the data in 
> the left list is stored in the flexform datastructure and is also loaded 
> from it. This is the moment where I get the wrong display. I tried to 
> hack this directly in the code but it seems that the encoding is broken 
> by saving it in the flexform.
> 
> So I got the idea that this is a bug in TYPO3 but to confirm this I ask 
> here if someone has the same problem or if I configured something wrong. 

Hm, could also be the same problem that occurs with standard select 
boxes that relate to records. While selecting everythings ok, bit on 
redisplay the selected items are garbled.

I tracked the above issue down. The BE form tries to be very clever and 
converts the string from BE language charset (eg latin1 for English and 
Geman) to the output charset. This is fine for old-style locallanf.php 
contents. Unfortunately this is of course nonsense when applied to DB 
date when forceCharset is in effect. To solve this quite a number of 
BE-functions must be changed.

Masi




More information about the TYPO3-dev mailing list