Character Issues with the Magpie RSS Parser
by c.bavota | Posted in Tutorials | 7 comments
A client asked for me to put together a page on his website that would collect info off of his RSS feed and populate a page that could be viewable by a handheld device. I decided to use a great tool called Magpie RSS to do the job but I encountered an issue with it not displaying certain characters properly.
When I first used Magpie RSS to parse the feed, some code came back displaying like this:
![]()
Instead of like this:
![]()
The solution was simple. Before you first call the Magpie RSS parser with PHP using the following code:
require_once 'rss_fetch.inc';
you need to add:
define('MAGPIE_INPUT_ENCODING', 'UTF-8');
define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
That will display every foreign character the way it should be displayed.



This was really helpful, thanks!
I was having trouble with this, thanks!
Hope that would solve my problem.. Once I heard magpie does not have the ability to parse unicode … that was quite wrong.. good to know that.
RSS Feeds are really very helpful and you could get site and news updates from it.-”~
RSS feeds are really great because you are always updated with the latest news or blog posts.-’,
Works like a charm! I was trying to use PHP to format the output but didn’t realize that the problem was coming from Magpie itself. Thanks!