How to fix mysql data encoding -
i'm working on database names saved in using latin1 character set encoding (latini_swedish_ci collation) names in persian.
seems body changed table collation utf8 (utf8_bin) still data :

i'm wondering how can fix values.
changed table collation , db collation still have kind of values. appreciate.
thank's in advance
it looks had
- utf8-encoded bytes in client, and
set names latin1(or equivalent), andcharacter set latin1on target column.
the "fix" clean table 2-step alter described here, involves
alter table tbl modify column col varbinary(...) ...; alter table tbl modify column col varchar(...) ... character set utf8 ...; where lengths big enough , other "..." have whatever else (not null, etc) on column.
sorry, take long time fix 1500000 rows.
i pretty sure not work:
alter table tbl convert character set utf8; -- no it work if table contains latin1 (etc) equivalent of utf8 characters. there no latin1 equivalent arabic characters.
(i see arabic: باسلام --> باسلام)
Comments
Post a Comment