[TYPO3-dev] convert to metaCharset or renderCharset?
Franz Holzinger
franz at ttproducts.de
Thu Oct 8 11:57:02 CEST 2009
Franz Holzinger a écrit :
> Hello Masi,
>
>>> I must do this conversion for the data I return to the xAjax call and
>>> data read in from the extensions tables by SQL calls.
>>
>> Ah, AJAX. In this case you must determine in which charset you want to
>> transmit your data. Many
>> libraries expect JSON/XML to be in utf8 independently from the charset
>> used in the corresponding
>> HTML page.
>>
> This can be configured. I have used:
>
> $charset = $TSFE->renderCharset;
>
> Which is iso-8859-1 in my case.
>
> // Encoding of the response to FE charset
> $this->taxajax->setCharEncoding($charset);
>
>
> Should this always use utf-8 instead of renderCharset?
>
>> In this case must convert to and from renderCharset to utf8.
>
> This still did not work.
>
> "Diese Universalgröße ist für Erwachsene und Kinder gleichermaßen
> geeignet, denn häufig "
>
> So maybe I should have converted it into iso-8859-1 from the renderCharset.
> But conversion from renderCharset to renderCharset does nothing and I
> could remove the char conversion completely. But other charsets than
> utf-8 and iso-8859-1 might not be supported any more by this method.
>
If I use utf-8 for Ajax and I later use the
$v = $csConvObj->conv($v, $TSFE->renderCharset, 'utf-8');
conversion, then I get:
"Diese Universalgre ist fr Erwachsene und Kinder gleichermaen geeignet,
denn hufig"
- Franz
More information about the TYPO3-dev
mailing list