MySQL encoding hell: How to export UTF-8 data from a latin1 table

After upgrading a client's Rails application and all its gems, it was finally time to export the MySQL database. For everyone's surprise, ch