简体   繁体   中英

Messed up the encoding

Hello I did a mistake by setting UTF8 on a website that was on ISO, the data came in the database like this �����2012年4�19��(���) Is there any solution to get the meaning of this sentence? it it Chinese characters normally.

Thank you.

You can try changing encoding to binary, and then to iso (but do make a backup)

ALTER TABLE `yourtablename` CHANGE `fieldname` `fieldname` TEXT CHARACTER SET BINARY NULL ; 
ALTER TABLE `yourtablename` CHANGE `fieldname` `fieldname` TEXT CHARACTER SET latin1 NULL ;

or to utf..

ALTER TABLE `yourtablename` CHANGE `fieldname` `fieldname` TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL ;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM