0

I have a column that is using the encoding cp1252 West and often it's recording data like this:

Diá»n Äàn Minecraft Viá»t Nam

Should I change this to UTF-8, or some other encoding, and will that fix the problem? I have a lot of text from foreign websites often.

What do you recommend?

Amy Neville
  • 10,067
  • 13
  • 58
  • 94
  • 1
    I would make a backup of the database and try: `ALTER DATABASE databasename CHARACTER SET utf8 COLLATE utf8_unicode_ci; ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;` – Sauced Apples Jan 31 '16 at 21:46
  • 2
    Using utf8 (actually utf8mb4) would be advisable, but changing the column in place is unlikely to fix all your existing data. See [UTF-8 all the way through](http://stackoverflow.com/questions/279170/utf-8-all-the-way-through) -- even if your application is not PHP, the same concepts apply. – Michael Berkowski Jan 31 '16 at 21:49
  • I'm not too worried about the data as it's just metadata that has been collected of some various sites. I could even CURL them again if I had to. Yes, I'll take a backup and try and convert to character set - that's some good tips thanks guys... – Amy Neville Jan 31 '16 at 21:50
  • @AmyNeville did that work? – Sauced Apples Jan 31 '16 at 22:24

0 Answers0