Remove ÿþ from string
ÿþ is 0xfffe in UTF-8; this is the byte order mark in UTF-16. You can convert your string to UTF-8 with iconv or mb_convert_encoding(): $trackartist1 = iconv(‘UTF-16LE’, ‘UTF-8’, $trackartist1); # Same as above, but different extension $trackartist1 = mb_convert_encoding($trackartist1, ‘UTF-16LE’, ‘UTF-8’); # str_replace() should now work $trackartist1 = str_replace(‘ÿþ’, ”, $trackartist1); This assumes $trackartist1 is … Read more