Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 608
  • Last Modified:

Converse database from LATIN1 to UTF8

HI
I have a database which be used iso charset: LATIN1. I want to converse it to charset utf8. How can I do that
Please tell me solution
Thank you
0
VIETSKY
Asked:
VIETSKY
1 Solution
 
VoteyDiscipleCommented:
This website ( http://confluence.atlassian.com/display/DOC/Configuring+Database+Character+Encoding )
suggests the best thing to do is:

1.  Do a mysqldump of your database
2.  Drop the database, and create it again with the encoding you want
3.  Import the mysqldump data again.


This seems pretty roundabout, and like the kind of thing that would be a huge hassle for a big database.  


Next up, http://dev.mysql.com/tech-resources/articles/4.1/unicode.html suggests altering individual columns to use UTF-8.  That too seems pretty darn tedious.


Finally, though, I hit on http://dev.mysql.com/doc/refman/5.0/en/alter-table.html

The ALTER TABLE statement supports the following syntax:

ALTER TABLE blah CONVERT TO CHARACTER SET utf8;
0
 
a0k0a7Commented:
Run the mySQL instance configurator from the server and change the default language from latin1 to utf8.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now