I have a weird unicode char in my mysql database
the value looks like this
card issuer bank didn<U+0092>t approve your payment
so what should be an apostrophe is a weird unicode char, presumably from windows
I want to replace it, but don't know how to quote it in SQL
tried the following, doesnt work:
replace(text,cast(0x0092 as character set utf8),'x')
0x0092
0x000x92
'\U+0092'
U'0x0092'
and tons of other combinations, none of them work
any ideas?
This page seems to be very close to what you're looking for, although the specific values are different; 0x0092 is decimal 146, the Windows code for right smartquote. That's the equivalent of 0xe28099 in UTF-8, as you'll see in the link :)
In summary:
...and so on.
Why not just brute force it to what you want?
update set = "card issuer bank didn't approve your payment" where =;
If there are many of these with the same issue, maybe trap it on the insert in the code?
If this is still not possible, try to convert() function on the whole value of the column.
convert( using utf8)
at the and I've ran the select result through the hex editor to figure out exactly whats coming out, so it turns out that is actually 0xc292, like described here.
Why would linux display this as U+0092 is beyond me