[TYPO3-dev] convert to metaCharset or renderCharset?

Franz Holzinger franz at ttproducts.de
Thu Oct 8 14:31:13 CEST 2009


Hello Masi,

Martin Kutschker a écrit :
> Franz Holzinger schrieb:
>> 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.
> 
> In this case must convert to and from renderCharset to utf8.

Your solution works great! I have had an error in my code using utf8 for 
Ajax and iso-8859-1 for the response which resulted in wrong characters.

Now I have moved all ajax character transfers to utf-8.

The conversion call is now:

$v = $csConvObj->conv($v, $TSFE->renderCharset, 
$this->ajax->taxajax->getCharEncoding());


- Franz





More information about the TYPO3-dev mailing list