0

I have a MYSQL database. Text is currently stored in charset latin1, collation latin1_swedish_ci. These are the defaults and it wasn't a problem back in the day when the database was originally created.

I want to switch over to UTF8 so the text encoding in the database matches out text encoding used elsewhere on the web site that uses the database.

My question is, what problems am I going to get when converting the data over and what should I be looking out for when I do. The majority of our text fits in plain acsii, but there are probably the occasional accented characters out there...

I think it would also be sensible to ask for any advice on the best way to go about changing the data.

2 Answers 2

2

If you're converting from ASCII to UTF-8, I expect apart from some accented characters, you'll be fine. Going backwards is the problem, in my experience.

Sign up to request clarification or add additional context in comments.

2 Comments

So mysql will take care of all the details, converting any accented characters to the appropriate utf8 encoding, leaving me with a table of correctly encoded utf8 characters?
In theory, yes. I've moved from ASCII to UTF on an inherited MySQL 4.x DB and it didn't appear to break anything.
0

Be attentive if you move data to other table. If the table encoding will be e.g. latin1 and you accidently put there raw UTF8 it will be a pain to recode it to the right encoding (if you do not have the source data ).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.