Getting UTF-8 encoded RSS Feed into PHP - garbage characters -
i'm attempting pull in rss feed website , display on own.
i'm using library called rsslib.php, here relevant function
function rss_retrieve($url){ global $rss_content; $doc = new domdocument(); $doc->load($url); $channels = $doc->getelementsbytagname("channel"); $rss_content = array(); ...
the rss feed has <?xml version="1.0" encoding="utf-8"?>
@ top
and page i'm displaying on has meta content type set utf-8
yet, i'm getting following coming through in content....
€™ in place of apostrophes
i've used htmlentities
, this:
$text = trim(htmlentities($child->wholetext, ent_quotes, "utf-8"));
where $child
instance of domtext
.
also works other domnode
properties far know.
Comments
Post a Comment