[TYPO3-dev] forceCharset = windows-1251 - do you plan to support this in Core?

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Fri Apr 28 14:37:40 CEST 2006


Valery Romanchev schrieb:
> Hello
> 
> from  class.t3lib_div.php
> 
> // PHP5 fix of charset awareness:
>    // Problem is: PHP5 apparently detects the charset of the XML file (or
> defaults to utf-8) and will AUTOMATICALLY convert the content to either
> utf-8, iso-8859-1 or us-ascii. PHP4 just passed the content through without
> taking action regarding the charset.
>    // In TYPO3 we expect that the charset of XML content is NOT handled in
> the parser but internally in TYPO3 instead. Therefore it would be very nice
> if PHP5 could be configured to NOT process the charset of the files. But
> this is not possible for now.

Hm, when I read the docs on php.net I must assume that this will not 
change. Only ASCII, latin1 and utf-8 are supported.

So I guess the only possible thing to do is to detect the charset before 
xml_parser_create() is called. If it's not one of the 3 supported charsets, 
convert the data to UTF-8. Then convert the resul array back to the 
original charset.

Masi




More information about the TYPO3-dev mailing list