If you have been working with RSS feeds chances are you’ve come across strange characters like “” and struggled to make them go away — we all have.
First you try and preg match them all…. but different ones keep popping up. And of course by the time you are done you are convinced that all these jerks that put -’s, %,^,*,@,!, and ~ in their posts are just out to get YOU personally. They are… get over it.
While you deal with that little fact, time to learn a little about the iconv function. Of course if you actually search for a way to get rid of all those strange characters in your rss feeds you find a lot of crap that isn’t very helpful. You ‘probably’ need the iconv function to get anywhere with the encoding problems you will experience when you try and scrape and display rss feeds…..
Here is a little example ($rss being the content you are converting):
$rss = iconv(“UTF-8″, “ISO-8859-1″, $rss);
The rest of the docs are on php.net – go read up.
2 Responses to Strange Characters in your RSS feeds when you try to display them? Fix it!
Leave a Reply Cancel reply
Codebank Latest Releases
Codebank Recently released: Location Generator Magic Keyword Plugin Magic Rss Linker 4 new tutorialsCategories
- 30 Day Website Network
- Black Hat Experiments
- Changing Affiliate World
- CodeBank
- Contests
- Digest
- Facebook Programming
- Featured Articles
- Features
- Internet Marketing Tips
- Network Building
- Network Progress Report
- Newbie Corner
- Online Tools
- Overview
- Rambling
- Rss Marketing
- Tutorials
- Uncategorized
- What Are We Going To Do Today?
Rss Notifications




Great post about ICONV
One thing that people may have to keep in mind when using this function is that their installation of PHP may not be correctly installed, especially if using shared hosting.
So to mke sure this works, I would suggest adding the following line somewhere in your PHP code
setlocale(LC_ALL, ‘en_US.UTF8′);
Thanks for the great post
Bruce
Thanks for that tip – I don’t have any more shared hosts so I haven’t experienced that at all.