http://alexking.org/blog/2008/03/06/mysql-latin1-utf8-conversion
And yes, the databases are created with different encodings.
Tables in MT are created with charset latin1, as in
CREATE TABLE `mt_asset` (
.
.
.
) ENGINE=MyISAM AUTO_INCREMENT=123 DEFAULT CHARSET=latin1;
whereas in wp4 they are created with charset UTF8
CREATE TABLE `wp_commentmeta` (
.
.
.
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
it is in spanish, here http://www.guatewireless.org/tecnologia/bases-de-datos/convertir-de-latin1-a-utf-8-en-mysql/
The steps are:
Export the database in latin1 to a file using the mysqldump command
:~$ mysqldump -u <user> -p <database> –default-
character-set=latin1 > backuplatin1.sql
(this will prompt for a password)
Using whatever admin tool you use, create a new database with UTF8
encoding
:~$ mysql -u mi_usuario -p
mysql> CREATE DATABASE nueva_db CHARACTER SET utf8 COLLATE
utf8_general_ci;
(I don't know what utf8_general_ci is exactly...)
Now convert the charset of the file backuplatin1.sql. In the resulting
file, change all references to charset latin1:
:~$ iconv -f ISO-8859-1 -t UTF-8 backup.sql > backup_utf8.sql
:~$ perl -pi -w -e 's/CHARSET=latin1/CHARSET=utf8/g;' backup_utf8.sql
(this can be done with different tools depending on your environment,
see more about this here: http://docs.moodle.org/en/Converting_files_to_UTF-8)
Now use the dumpfile converted to utf8 importing it into the new
database just created
:~$ mysql -u mi_user -p nueva_db –default-
character-set=utf8 < backup_utf8.sql
By following this procedure, we would have a copy of the original MT
database but now using latin1 instead of UTF8.
We still would have to migrate it to WP4