PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » XML » XML_Beautifier » Bug #2144

High-UTF entities in attributed decoded as ?

Details

Submitted2004-08-17 07:08 UTC
Fromspam at julik dot nl
StatusVerified
PackageXML_Beautifier
PHP Version4.3.3
OSMacOS 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>