Categories
Tips & Tricks

Fixed: Corrupt SQL file contains unicode characters

I happened to have my backup sql file which contains Unicode characters broken. This happened when I had just bought a new version of Mamp Pro to install in my Mac. It comes with the latest PHP and a lot of exiting features!

I then re-installed my database of one project that contains Unicode characters. Unfortunately, it shows strange characters like below:

It’s a double converted character. To fix it, simply:

  1. Convert back to latin1
  2. Convert to binary
  3. Convert to utf8

So, go to the SQL tab of the phpMyAdmin, and run the following command:

alter table table_name modify field_name VARCHAR(2000) character set latin1;
alter table table_name modify field_name blob;
alter table table_name modify field_name VARCHAR(2000) character set utf8;

Then the unicode character will be back.

By Vannkorn

I am a WordPress lover. I make my living using WordPress.

Leave a Reply

Your email address will not be published. Required fields are marked *