I've got a database with a bunch of broken utf8 characters scattered across several tables.
The list of characters isn't very extensive AFAIK (áéíúóáéíóú??)
Fixing a given table is very straightforward
update orderItem set itemName=replace(itemName,'??','á');
But I can't get a way of detecting the broken characters. If I do something like
SELECT * FROM TABLE WHERE field LIKE "%?%";
I get nearly all the fields because of the collation (?=a). All broken characters so far start with an "?". The database is in spanish so this particular character isn't used
The list of broken chars I've got so far is
?? = á
?? = é
?-- = í
?3 = ó
?± = ?
?? = á
Any idea of how to make this SELECT to work as intended? (a binary search or something like that)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…