I have a site where a client has inserted text. Probably by copying it from a PDF or Word document. There is a strange character that appears at random places in the inserted text. The site is full of them so i would like to get rid of them programmatically, either by a search and replace in the database or by filtering via PHP when the value is printed out via str_replace();
The character looks like this, and is not recognized when i search for it in the database, and not even when you search for it with the built in browser search function.
It looks the same in the database as it does when rendered. In some cases it′s like an empty square, in some cases with a questionmark inside it.
I have tried this without luck:
$value = str_replace( '', '', $value );
(The square in first argument seems to be removed when i save)
question from:https://stackoverflow.com/questions/65683070/squares-apperaing-in-text-want-to-search-replace