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 [Com]: "Amélie" turns into "Amélie" after simplexml_load_file()
by kemps at free dot fr other posts by this author
Jul 21 2004 7:38PM messages near this date
#29194 [Opn->Bgs]: "Amélie" turns into "Amélie" after simplexml_load_file() | #29193 [NEW]: PHP has encountered an Access Violation at 013173CD
ID:               29194
 Comment by:       kemps at free dot fr
 Reported By:      tsigo at tsigo dot org
 Status:           Open
 Bug Type:         SimpleXML related
 Operating System: Gentoo
 PHP Version:      5.0.0
 New Comment:

It's seems that the output is utf-8 encoded.
I personnaly used a utf8decode($string_to_output).
Don't know if it is a bug or not ! (Francois)


Previous Comments:
------------------------------------------------------------------------

[2004-07-15 23:58:12] tsigo at tsigo dot org

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 this bug report at http://bugs.php.net/?id=29194&edit=1
Thread:
tsigo at tsigo dot org

kemps at free dot fr

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