I have to redesign a class where (amongst other things) UTF-8 strings are double-encoded wrongly:
$string = iconv(\'ISO-8859-1\', \'UTF-8\', $string);
:
$str
MySql is charset aware, so you can convert in SQL. But for this case, I would probably prefer to just script it in PHP, as it's a one-off task anyway.
Keep in mind that columns in MySql have a charset property. The collation is (in theory) orthogonal to the charset. While a utf8_general_ci collation would imply that the charset is utf8, it's not a given. You could in theory mix a utf8 collation with a latin1 encoding (And get garbage as a result).
If you decide to do this in SQL, look here:
http://dev.mysql.com/doc/refman/5.0/en/charset-convert.html