PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » XML » XML_Feed_Parser » Bug #7549

Special Characters

Details

Submitted2006-05-03 13:42 UTC
Frombistory at gmail dot com
StatusBogus
PackageXML_Feed_Parser
PHP Version5.1.2
OSXP
Roadmaps(Not assigned)

Comments

[2006-05-03 13:42 UTC] bistory at gmail dot com

Description:
------------
Latin characters like éèà etc... are'nt recognize by xml_feed_parser

Test script:
---------------
Test this feed and compare with an other agregator...
http://www.clubic.com/xml/news.xml

[2006-05-03 14:35 UTC] bistory at gmail dot com

The problem happened with RSS 2.0, I don't know if it can help you...

[2006-05-16 20:25 UTC] jystewart at php dot net

I believe that's because the return values are UTF-8 encoded
(the default within PHP's DOM and the encoding specified by
your feed) but PHP doesn't set the content type of the
returned page automatically.

You could either send an http header or meta tag to indicate
that the content is utf-8, eg:

<meta http-equiv="Content-Type" content="text/
html;charset=UTF-8">

or you can use utf8_decode on the returned value to convert
it into the appropriate character set, eg:

print utf8_decode($entry->content);

If there's sufficient demand, I'll consider adding an
optional 'decode utf8' parameter to determine how the parser
returns values.