insert - Navicat (MySQL) Character Encoding Error -
i using navicat 11.0.8 , trying insert values table using query when try insert values query works character encoding messed up!
as can see on code, table 'table' , inserting id, vnum , name. vnum '体字' , name 'versão'.
insert table values ('1', '体字', 'versão');
instead of showing '体字' on vnum , 'versão' on name, shows '体å—' , 'versão'.
this bad me because trying insert more 5000 lines alot of information.
i have tried set character encoding of table using these commands:
alter table table convert character set utf8 collate utf8_unicode_ci; & alter table table convert character set big5 collate big5_chinese_ci; & alter table table convert character set utf8 collate utf8_general_ci;
i have tried delete table , create new 1 character encoding utf-8 , send values..
set foreign_key_checks=0; drop table if exists `table`; create table `table` ( `vnum` int(11) unsigned not null default '0', `name` varbinary(200) not null default 'noname', `locale_name` varbinary(24) not null default 'noname', ) engine=myisam default charset=big5_chinese_ci; insert `table` values ('1', '体字', 'versão');
still show's '体å—' , 'versão'.
if edit table manually, show's correct! not going edit 5000+ lines...
it shows '体å—' , 'versão'.
-- sounds had set names latin1
. do
set names utf8;
after connecting , before inserting. tells mysqld encoding client using.
verify data stored doing select col, hex(col) ...
utf8 (or utf8mb4) hex 体字
e4bd93e5ad97
. interpreting same bytes latin1
gives 体å—
;
utf8 can handle those, plus ã
; don't know if big5 can.
actually, suggest use utf8mb4 instead of utf8. in case encounter of 4-byte chinese characters.
if still have latin1 columns need changing utf8mb4, see blog, discusses "2-step alter", using binary
or blob
(not big5) intermediate.