I have an arial character giving me a headache. U+02DD turns into a question mark after I turn its document into a phpquery object. What is an efficient method for removing the character in php by referring to it as 'U+02DD'?
I have an arial character giving me a headache. U+02DD turns into a question
Share
Use
preg_replaceand do it like this:To refer to large unicode ranges, you can use preg_replace and specify the unicode character with
\x{abcd}pattern. The second parameter is an empty string that. This will make preg_replace to replace your character with nothing, effectively removing it.[EDIT] Another way:
Did you try doing
htmlentitieson it. As it’s html-entity is˝, doing that OR replacing the character by˝may solve your issue too. Like this: