Finding strange characters in mysql -
a year back, migrated our data mysql. due encoding mismatch, number of strange characters(Ã,ª, €, etc) got inserted records. track such characters in whole database.
i tried following query.
select * <table_name> <field_name> regexp '[^a-za-z0-9&,$\'"() .-]'
it gives me entries have character(s) apart a-z, a-z, 0-9, &, comma, dollar, single-quotation, double-quotation, parenthesis, space, period, hyphen in <field_name>
of particular table.
but take lot of time find strange characters have approximately 93 table approximately 20 fields each.
is there better approach resolve issue?
re-importing again proper encoding setting not option because data has changed lot since then.
the characters mention utf-8 data rendered if ascii or latin-1 8 bit characters.
here's post on how find problems. works better approach , super-disciplined character set matching.
how can find non-ascii characters in mysql?
can provide table definition of 1 of tables containing junk? way can see character set , collation settings of table , columns.
Comments
Post a Comment