Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Replace unreadable characters from the description (e.g. )
- $string = utf8_decode($string);
- $string = iconv("UTF-8", "ISO-8859-1//IGNORE", $string); // ignore non UTF-8 characters
- $temp = utf8_decode('Â');
- $string = str_replace($temp, '', $string); // replace  character with a space
- $string = preg_replace('/[^a-zA-Z0-9_ %\[\]\.\(\)%&-]/s', ' ', $string); // regular expression
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement