Re: Stripping weird characters from RSS feed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Nowosielski wrote:

> I have a RSS feed aggregater that grabs RSS from the net then stores it
> to a MySQL database. Once in a while I get feeds with weird characters
> look really bad.

> Ghana: Country Loses ¢20.2bn Through Music Piracy

This looks like a case of reading the file using the wrong character
encoding. Find out what encoding the file is in (the HTTP header /should/
tell you, if it doesn't then the XML prolog should), and use that.

Of course, its possible the encoding information sent with the file is
wrong, in which case you could try guessing (and should certainly prod at
the feed provider to get them to fix their mistakes).

-- 
David Dorward       <http://blog.dorward.me.uk/>   <http://dorward.me.uk/>
                     Home is where the ~/.bashrc is

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux