Character Issues with the Magpie RSS Parser
by Bandicoot Marketing on | 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:
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.
7 comments for “Character Issues with the Magpie RSS Parser”