views:

98

answers:

1

I have a MySQL database that I recently migrated to another server. Unfortunately, MySQL dumps its data in Latin1 with any UTF-8 characters represented by composite bytes (ex. – instead of —).

Is it possible to run a simple query or script that would convert these composite bytes to UTF-8 within my tables? It's impossible to do it row by row because there are hundreds of thousands of rows.

A: 

see http://www.mysqlperformanceblog.com/2007/12/18/fixing-column-encoding-mess-in-mysql/

longneck
This appears to be geared toward transcoding from a russian charset to UTF8. It doesn't really solve the issue of the composite bytes as far as I could see. I do appreciate the link though.
Mike Keen
just because the example they used was for a russian character set doesn't mean you can make it fit your needs. for example, the last query in the document will probably correct your problem. you'll need to test it first on a test table.
longneck