Home » XML » XML_Beautifier » Bug #2144
High-UTF entities in attributed decoded as ?
Details
| Submitted | 2004-08-17 07:08 UTC |
|---|---|
| From | spam at julik dot nl |
| Status | Verified |
| Package | XML_Beautifier |
| PHP Version | 4.3.3 |
| OS | MacOS X 10.3 |
| Roadmaps | (Not assigned) |
Comments
[2004-08-17 07:08 UTC] spam at julik dot nl
Description:
------------
When converting XML in UTF-8 containing russian letters
encoded as character references in attribute values
converted attribute values contain only ?????
Reproduce code:
---------------
$_xml = '<' . '?xml version="1.0" encoding="UTF-8"?' . '>';
$_xml .= <<<EOF
<bogustag attribute="Инновационный дайджест">
<content />
</bogustag>
EOF;
require_once 'pear/XML/Beautifier.php';
$bf = new XML_Beautifier;
echo $bf->formatString( $_xml);
Expected result:
----------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bogustag attribute="(russian letters here)">
<content />
</bogustag>
see http://clients.julik.nl/cases/bea.xml
Actual result:
--------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bogustag attribute="????????????? ????????"
feed_id="4">
<content />
</bogustag>