From:             tsigo at tsigo dot org
Operating system: Gentoo
PHP version:      5.0.0
PHP Bug Type:     SimpleXML related
Bug description:  "Amélie" turns into "Amélie" after simplexml_load_file()

Description:
------------
Example XML file:

<?xml version="1.0" encoding="us-ascii"?>
<Collection>
<DVD>
  ...
  <Title>Am&#233;lie</Title>
  ...
</DVD>
</Collection>

This is referring the movie "Amelie", and &#233 should turn into an
accented 'e' (�), but instead it gets processed as "Amélie".

Reproduce code:
---------------
$Collection = simplexml_load_file($filename);
echo htmlentities((string) $Collection->DVD->Title); // Produces
"Am&Atilde;&copy;lie"

Expected result:
----------------
Preserve the &#233; in the title.

Actual result:
--------------
Changes &#233; to é

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

Reply via email to