In: , , ,
On: 2005 / 01 / 25
Shorter URL for this post:

Via How to get rid of invalid UTF-8 characters: to remove them, for example after aggregating or rss feeds, simply use this trick :

  1. $text = iconv("UTF-8","UTF-8//IGNORE",$text);

Shorter URL

Want to share or tweet this post? Please use this short URL:


This entry "Remove Invalid Characters in UTF-8" was posted on 25/01/2005 at 5:34 pm and is tagged with , , ,
Watch this discussion : Comments RSS 2.0.

5 Blablas

  1. piou says:

    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 ;)

  2. Chs says:

    Thank you for this, it helped me a lot.

  3. HighToro says:

    You're a genious! Tnx a lot!!

  4. mary says:

    thanks, helped me out a lot :)

  5. Daniel says:

    Great code, that helped me a lot! Thanks!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

Read more ?