Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.21.0

Bug #17636 Can't parse accentuated tagnames
Submitted: 2010-07-28 19:14 UTC
From: tamicsko Assigned:
Status: Open Package: XML_Serializer (version Unknown)
PHP Version: 5.2.6 OS: windows xp sp3
Roadmaps: (Not assigned)    
Subscription  


 [2010-07-28 19:14 UTC] tamicsko (Tamás Bennó)
Description: ------------ Accentuated tagnames are replaced as XML_Serializer_Tag in serialize(). The php file itself is UTF-8 encoded Test script: --------------- $xx = new XML_Serializer( array( XML_SERIALIZER_OPTION_INDENT => "\t", XML_SERIALIZER_OPTION_LINEBREAKS => "\n", XML_SERIALIZER_OPTION_ROOT_NAME => 'xml', XML_SERIALIZER_OPTION_MODE => XML_SERIALIZER_MODE_SIMPLEXML, XML_SERIALIZER_OPTION_CDATA_SECTIONS => true, XML_SERIALIZER_OPTION_XML_ENCODING => 'UTF-8' ) ); $data = array( "tag_1" => "value_1", "tag_2" => array( "tag_á_3" => "value_é" ), "tag_é_4" => array( "tag_5" => "value_5" ) ); $xx->serialize( $data); $xml_data = $xx->getSerializedData(); print_r( $xml_data); Expected result: ---------------- <xml> <tag_1><![CDATA[value_1]]></tag_1> <tag_2> <tag_á_3><![CDATA[value_é]]></tag_á_3> </tag_2> <tag_é_4> <tag_5><![CDATA[value_5]]></tag_5> </tag_é_4> </xml> Actual result: -------------- <xml> <tag_1><![CDATA[value_1]]></tag_1> <tag_2> <XML_Serializer_Tag><![CDATA[value_é]]></XML_Serializer_Tag> </tag_2> <XML_Serializer_Tag> <tag_5><![CDATA[value_5]]></tag_5> </XML_Serializer_Tag> </xml>

Comments