[TYPO3-project-formidable] Charset Problem with includexml

media.res | christian hechenblaikner c.hechenblaikner at mediares.at
Thu Feb 22 12:22:15 CET 2007


Hello,

I experienced problems with the charset when using includexml. I am
using php5.1 (which is importantant for div_xml2array)

Example:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<formidable version="0.5.0">
...

   <renderlet:CHECKBOX name="zone">
                        <label>Ort</label>
                        <renderonly>true</renderonly>
                        <data>                             		
<includexml>EXT:my_ext/pi1/forms/ic_start/_zones_items.xml</includexml>
                        </data>
    </renderlet:CHECKBOX>
...
</formidable>




Content of EXT:my_ext/pi1/forms/ic_start/_zones_items.xml
<items>
	<item>
		<caption>NÖ</caption>
		<value>96</value>
	</item>
...

</items>


The encoding of the main file is utf-8 (taken from the header) but the
encoding of <includexml> is iso-8859-1.

This is because the method div_xml2array takes as last argument:
$php5defCharset='iso-8859-1'

When playing around (in div_xml2array) I noticed the following:

1: I cannot use xml prolog (<?xml version="1.0" encoding="utf-8"   ?> )
in includexml
--> FORMidable : Mayday: Parser says : XML error: Reserved XML Name at
line 1

2: $TYPO3_CONF_VARS['BE']['forceCharset']  will never be executed
because is not set to global (global $TYPO3_CONF_VARS; fix that)

3: because of (1) and (2) will not be used, the method use the
iso-8859-1 from the parameter.


Can anybody reproduce this problem?
If so, in my opinion, the charset from the root xml should be used, and
the includexml should use them automatically.

Any comments on that issue?


Thx,
 Christian





More information about the TYPO3-project-formidable mailing list