Converting MySQL from latin1 to utf8

Edit /etc/mysql /my.cnf

Under [client] add

Under [mysqld] add

Dump you database to a file

Then edit your dump file and change every CHARSET=latin1 to CHARSET=utf8.

Convert all your faulty characters to utf8 characters, then load the dump file back into MySQL, e.g. with

 

Source (modified) https://www.toptal.com/php/a-utf-8-primer-for-php-and-mysql

Be the first to comment

Leave a Reply