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

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -