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.

longneck
  • 11,938
  • 2
  • 36
  • 44
Mike Keen
  • 171
  • 1
  • 4
  • 12

1 Answers1

0

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

longneck
  • 11,938
  • 2
  • 36
  • 44
  • 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 Sep 03 '09 at 19:25
  • 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 Sep 04 '09 at 13:21