apostrophe replaced by question mark
Status: Beta
Brought to you by:
kellan
If there is an apostrophe, it changes to a question
mark when is processed by MagpieRSS. For example, it
will switch "it's" to "it?s". The RSS feed is valid.
I am using WordPress v1.5 to make the RSS feed, and
everything shows up in the RSS feed correctly. I am
also using MagpieRSS v0.71.1. I tried googling for
help, and searching this site, but I couln't find any
solutions.
Logged In: NO
This is how I worked around the problem:
define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
$content = ereg_replace("</br>","",$content);
$content = ereg_replace("’","’",$content);
$content = ereg_replace("‘","‘",$content);
$content = ereg_replace("“","“",$content);
$content = ereg_replace("…","…",$content);
$content = ereg_replace("","”",$content);
$content = ereg_replace("<br >","<br>",$content);
Logged In: NO
Forgive my ignorance, but where would this code be placed?
Here's the code I have on my index.php page:
<?php
require_once('magpierss/rss_fetch.inc');
require_once('magpierss/rss_utils.inc');
$date_format = "F d, Y h:i:s a";
$rss =
fetch_rss('http://www.sharethegift.ca/wordpress/?feed=rss2');
$items = array_slice($rss->items, 0, 3);
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];
$date = $item['pubdate'];
$created = date($date_format, $item['date']);
$pubdate = date("F d, Y g:i a",
strtotime($date)+7200);
$desc = $item['description'];
echo "<p><a href=$href><b>$title</b></a><br
/>$pubdate</p>";
}
?>
Thanks.
Denis
denis@betterthanajob.com
Logged In: NO
Where does the code for the workaround go? Which file and line?