Character Issues with the Magpie RSS Parser

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: first Instead of like this: second 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.
Search

Popular Posts

Small Biz Website Tips Newsletter

Stay up to date with the latest marketing, sales, and service tips and news.

Small Biz Website Tips Newsletter

Stay up to date with the latest marketing, sales, and service tips and news.