Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have some legacy mysql files of the format frm, MYI and MYD that i wish to export to csv. Using sequel pro on OSX, i created a new database and copied those files over.

All the data can be accessed fine but i have major issues with the query results due to unknown encoding. I have no idea what format the previous programmer used.

This database contain English, Chinese, Japanese and Korean song titles but as i have no idea what format these names are encoded in, so i get weird characters using utf8 format:

ÄÐÉù ÂèÂèºÃ+ɵ´ó½ã+ÆÃË®¸è Àä¿ÕÆøµÄ¶À°× À¶É«µÄÃÎ

Most of them begins with A with an accent though, i wonder if they do provide any clue as to which encoding format the programmer used.

I've tried putting these text onto safari/chrome browser and ran through the various encoding options but to no avail.

Will anyone please help me?

share|improve this question

migrated from programmers.stackexchange.com Dec 27 '11 at 5:37

This question came from our site for professional programmers interested in conceptual questions about software development.

    
I would say this looks like an issue with it not being UTF8 but UTF16. Too late for my brain to function now, but that A character is common on UTF issues. –  jcolebrand Dec 27 '11 at 5:43
add comment

2 Answers

Is your client talking utf8? Run

SET NAMES utf8;

and see if your selects output correctly?

share|improve this answer
add comment

I'm not familiar with Sequel Pro but here's my guess at what happened: The records we dumped out in utf8 correctly but the import was treating the dump as if it was latin1.

Ensure that both schemas are set to utf8 and both the export and import connections are told to talk in utf8.

Using the built in mysqldump command is pretty good about making sure all variables get set properly to avoid character encoding issues.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.