Possible duplicate:
How to replace � in a string
I am reading data from an XML sheet coming out of a database. In the raw output, I go over this “�” character, which is a UTF-8 string meaning "". Performing a simple search and delete with str_replace does not do the trick when searching for "" or "�". Is there any other way to remove this character from a string?
UPDATE:
For reference, this is a function that clears strings for me.
function db_utf8_convert($str) { $convmap = array(0x80, 0x10ffff, 0, 0xffffff); return preg_replace('/\x{EF}\x{BF}\x{BD}/u', '', mb_encode_numericentity($str, $convmap, "UTF-8")); }
source share