![]() If you open it in a utf-8 compatible text editor you should be able to read everything… no garbled characters.ģ) change SET NAMES latin1 to SET NAMES utf8 Ĥ) change DEFAULT CHARSET=latin1 to DEFAULT CHARSET=utf8 ĥ) import the file as utf-8 into the target database… if everything is set correctly then the non-ascii characters should be preserved. I used navicat to dump the database and the file it generated was utf-8. ![]() In order to preserve non-ascii characters when transferring data from a mysql database encoded with latin1 to another mysql database:ġ) make sure that the target database is set with a default encoding of utf8ĪLTER DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci Ģ) export the database encoded as utf-8. Here’s a checklist I saved for future-me last time I had to deal with it: Have you checked to make sure that the DB and the DB tables are all set to utf8_general_ci collation? I’ve seen it where the tables are utf8 but the database itself is latin1 and all hell breaks loose.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |