Via How to get rid of invalid UTF-8 characters: to remove them, for example after aggregating del.icio.us or rss feeds, simply use this trick :
- $text = iconv("UTF-8","UTF-8//IGNORE",$text);
Shorter URL
Want to share or tweet this post? Please use this short URL: http://ozh.in/43
ah ah
character encoding is a neverending source of headaches
UTF-8 should be used if you dont't want to use HTML equivalents of unusual characters in your page (unless your site is in english only)
but only recent versions of MySQL can manage UTF-8, so that knowing webhosts never upgrade their servers, it's all about converting every time you use a database…
not to speak of text editors and windows 's false iso charset
(take a look at wordpress's souce ;)
Thank you for this, it helped me a lot.
You're a genious! Tnx a lot!!
thanks, helped me out a lot :)
Great code, that helped me a lot! Thanks!