I need to clean a string that comes (copy/pasted) from various Microsoft Office suite applications (Excel, Access, and Word), each with its own set of encoding.
I\'m
This one also works, i found somewhere
$str = trim($str, chr(0xC2).chr(0xA0));
You have to do this with single quotes like this:
str_replace('\u00a0', "",$string);
Or, if you like to use double quotes, you have to escape the backslash - which would look like this:
str_replace("\\u00a0", "",$string);