UTF-8 and MySQL

I am still in the process of moving the sites from my old host to DreamHost. One of the sites is one I host for a fellow artist. After doing the regular MySQL dump, and loading this dump into the new database, all unicode characters were, to say it in proper english, fucked up.

Luckily, MySQL has some options to set the character encoding for the queries. It didn't completely solve the problem, but at least helped. I ended up using the following command to import the database:

mysql -usomethingorother -p --default-character-set=UTF8 --host=databasehostIwantedtoimportto databasename < backup.sql

This solved 99% of the problems. There were still some small problems with specific characters, but overall, everything worked fine. Long live MySQL :)