I have a JSON string from an ajax call which contains some special character. The problem is, that there is a function that removes all slashes from the string (which I have to use sadly). But it breaks any Unicode character in it...
So I have a string like that:
mmu00b2
Which should be converted to UTF-8:
mm²
I tried this regex here, but with no luck: preg_replace("/u(\w+)/i", "\x$1", $str );