<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bavotasan.com &#187; parser</title>
	<atom:link href="http://bavotasan.com/tag/parser/feed/" rel="self" type="application/rss+xml" />
	<link>http://bavotasan.com</link>
	<description>by c.bavota</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:42:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Character Issues with the Magpie RSS Parser</title>
		<link>http://bavotasan.com/2009/character-issues-with-the-magpie-rss-parser/</link>
		<comments>http://bavotasan.com/2009/character-issues-with-the-magpie-rss-parser/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 17:08:27 +0000</pubDate>
		<dc:creator>c.bavota</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[call]]></category>
		<category><![CDATA[character]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Handheld Device]]></category>
		<category><![CDATA[info]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[Job]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[Tool]]></category>
		<category><![CDATA[way]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://bavotasan.com/?p=232</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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 <a href="http://magpierss.sourceforge.net/">Magpie RSS</a> to do the job but I encountered an issue with it not displaying certain characters properly.<br />
<span id="more-232"></span><br />
When I first used Magpie RSS to parse the feed, some code came back displaying like this:</p>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/02/first.png" alt="first" title="first" width="400" height="20" class="aligncenter size-full wp-image-234" /></p>
<p>Instead of like this:</p>
<p><img src="http://bavotasan.com/wp-content/uploads/2009/02/second.png" alt="second" title="second" width="400" height="21" class="aligncenter size-full wp-image-235" /></p>
<p>The solution was simple. Before you first call the Magpie RSS parser with PHP using the following code:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'rss_fetch.inc'</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p>you need to add:</p>

<div class="wp_syntax"><table border='0' cellpadding='0' cellspacing='0'><tr><td><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'MAGPIE_INPUT_ENCODING'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'MAGPIE_OUTPUT_ENCODING'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></td></tr></table></div>

<p>That will display every foreign character the way it should be displayed.</p>
]]></content:encoded>
			<wfw:commentRss>http://bavotasan.com/2009/character-issues-with-the-magpie-rss-parser/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

