ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-Dev
php-Dev
#29194 [NEW]: "Amélie" turns into "Amélie" after simplexml_load_file()
by tsigo at tsigo dot org other posts by this author
Jul 15 2004 9:58PM messages near this date
Re: [PHP-DEV] Fwd: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_language_parser.y zend_language_scanner.l | #29194 [Opn->Bgs]: "Amélie" turns into "Amélie" after simplexml_load_file()
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
Thread:
tsigo at tsigo dot org

kemps at free dot fr

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved