[TYPO3-dev] xaJax update 0.2.3 available
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Mon Mar 20 15:48:36 CET 2006
Elmar Hinz schrieb:
>
> 2. If you set xajax's character encoding to something else, all
> response output will use that encoding (and a bug was fixed in 0.2.2
> along these lines). However, the input will still be in UTF-8, so if
> you directly output the UTF-8 input using a custom encoding, there
> will be a big mismatch.
Why do I have to set the encoding manually? For both BE and FE that charset
is known. Manual override is nice for a lib, but in this case we have a
sane and 100% working default.
> 3. In order to fix this, use the decodeUTF8InputOn() method. xajax
> will then try a variety of means to convert the UTF-8 input to your
> custom encoding. It will try PHP's iconv extension, and if that isn't
> available it will try the mb_string extension. If that isn't
> available, it will try utf8_decode ONLY if the custom encoding is
> ISO-8859-1. Otherwise, it will trigger a notice (E_USER_NOTICE)
> explaining that the data couldn't be converted.
For conversion you should use t3lib_cs, which is available as an already
instantiated object in BE and FE.
Masi
More information about the TYPO3-dev
mailing list