From:             jay at kuantic dot com
Operating system: linux fedora core 1
PHP version:      5.0.0RC1
PHP Bug Type:     *XML functions
Bug description:  Simple Xml output only utf-8

Description:
------------
Simple Xml seems to output only utf-8. No matter how specified in
encoding='iso-8859-1' and not simple function to change encodage.

Reproduce code:
---------------
$xmlstr = <<<XML
<?xml version='1.0' encoding='iso-8859-1'?>
<root>
        <section>
                <title>Gestion des Objets</title>
                <title>Gestion des Géolocalisation</title>
                <title>Autres questions...</title>
        </section>
</root>
XML;

$xml = simplexml_load_string($xmlstr);
foreach ($xml->section->title as $title) {
echo $title, '<br />';
}
?>

Expected result:
----------------
Gestion des Objets
Gestion des Géolocalisation
Autres questions...

Actual result:
--------------
Gestion des Objets
Gestion des Géolocalisation
Autres questions...

-- 
Edit bug report at http://bugs.php.net/?id=28154&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28154&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28154&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28154&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28154&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28154&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28154&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28154&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28154&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28154&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28154&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28154&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28154&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28154&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28154&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28154&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28154&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28154&r=float

Reply via email to