From: lehphyro at yahoo dot com dot br
Operating system: Windows
PHP version: 5.0.1
PHP Bug Type: SimpleXML related
Bug description: Errors with encoding
Description:
------------
I tried to load a xml file with ISO-8859-1 encoding.
I have tried several ways for loading, but I had no success because
simplexml returns the loaded string with errors.
I have tried iconv functions too.
Reproduce code:
---------------
file test.php:
<?php
include ("example.php");
$xml = simplexml_load_string($xmlstr);
echo $xml->movie[0]->plot;
?>
file example.php:
<?php
$xmlstr = <<<XML
<?xml version='1.0' encoding="ISO-8859-1"?>
<movies>
<movie>
<plot>
Matr�cula
</plot>
</movie>
</movies>
XML;
?>
Expected result:
----------------
Matr�cula
Actual result:
--------------
Matrícula
--
Edit bug report at http://bugs.php.net/?id=29988&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29988&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29988&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29988&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=29988&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29988&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29988&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29988&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29988&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29988&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29988&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29988&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29988&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29988&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29988&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29988&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29988&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29988&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29988&r=float