PHP code to fix invalid UTF-8 data inside a string
PHP July 16th, 2007
I wrote A wordpress plugin to fix the invalid UTF-8 data inside the feed, in that plugin the core purpose is to fix invalid UTF-8 data inside a string.
It’s pretty simple to do so in PHP, I learned from here:
the following iconv line gets rid of all invalid UTF-8 characters.
$t = iconv("UTF-8","UTF-8//IGNORE",$t);Problem solved
![]()
Popularity: 7% [?]
About
I have visited your site 119-times