export and import utf8 data in mysql: best practices

Posted by ChrisRamakers on Stack Overflow See other posts from Stack Overflow or by ChrisRamakers
Published on 2010-05-04T08:16:21Z Indexed on 2010/05/04 8:18 UTC
Read the original article Hit count: 331

Filed under:
|
|
|

We're often faced with the need to send a data file to one of our clients with data from the database he/she needs to translate. Most of the time this export is CSV or XLS. Most of the time we create a csv dump with phpmyadmin and get an xls file in return with the translated data. The problem is that most of the time the data is UTF8 and when the file is returned as xls each and every time we load the data into mysql again we end up with utf8 problems, characters not being displayed properly, etc ...

We've already doublechecked everything in mysql from my.conf to column charactersets and everything is set correctly to UTF8.

My question is not how to fix the encoding issue since that's been solved but how we would best proceed in the future handling this situation? What export format should we hand over? How should we import (just mysql load data infile or our own processing scripts). What is the general consensus on how to handle this situation?

We would like to continue using excel if possible since that's the format almost everybody expects including our clients' translation agencies. Our clients' ease of use is the most important factor here, without overloading us with major issues each time. The best of both worlds :)

© Stack Overflow or respective owner

Related posts about mysql

Related posts about import