0

I know this question has been asked in many forms before but I could not find an answer to my specific question.

THE SCENARIO

Database Mysql, West European - Latin 1

Exported using sequel pro to sql file

Reimported the exact same file and had quotes, apostrophes, em dash, en dash, TM, Reg characters turn to question marks.

I fixed these by opening the sql file in vim and replacing the <94>, <95>, ect. hex codes with their correct counterpart.

Reference: :%s/<93>/\'/g

Source

MY QUESTION

How can I prevent this from happening in the future? My guess is that these characters are being pasted in from a word doc in the admin part of the website but I don't understand why it re-imports incorrectly. For now, I have replaced all the characters and everything is close to normal. Should I convert the table to utf8? I do have several translations of the site in the DB.

NOTES

I have exported this database several times before and never had this problem. I have exported it to a staging server (which is the same server as the live server, just a different host) and a local server. Any ideas of why this might happen all of a sudden?

I have looked into a lot of issues like double character encoding and wrong encoding formats but I think this situation is different. I also tried several of those solutions and they did not work.

Similar Questions

Special characters get lost in MySQL export/import

Community
  • 1
  • 1
styks
  • 3,193
  • 1
  • 23
  • 36
  • every single step of the data travels should be encoded in utf-8. Maybe this post could help you: http://stackoverflow.com/a/11432833/1291428 check the exported file with ultra edit or similar and save it as utf-8 no bom – Sebas Mar 22 '13 at 15:00
  • Even if the database is latin 1? Additionally, I think I tried to import as ut8f but sequel pro could not read the file as ut8f. – styks Mar 22 '13 at 15:03
  • that's a severe issue. You can change your database encoding, the latin-1 character gruop is included into utf-8 – Sebas Mar 22 '13 at 15:04

0 Answers0