latin1 to utf8

latin1 to utf8

am 26.05.2006 09:17:46 von ranjithkumar

I am using mysql and have some data in my application in the latin1
charset. I have a necessity to support the utf 8 charset. Now I want to
migrate the data between these two charset.

The normal way I do migration is as follows:

Taking a dump of the data with the currently running mysql
converting the necessary parameters in the mysql settings and starting
the mysql with utf8 support
droping the database.
replacing latin1 to utf 8 in the dump.sql file
loading the data back on to the mysql db.


I am fearing of a data inconsistency in the way I do....

Is the above way fool proof and will not cause any data loss or there
is a easy way to convert things to utf8 support using mysql commands
without using a dump.

Appreciate a quick response.

Thanks ,
Ranjith

Re: latin1 to utf8

am 26.05.2006 17:05:00 von Aggro

ranjithkumar@gmail.com wrote:
> I am using mysql and have some data in my application in the latin1
> charset. I have a necessity to support the utf 8 charset. Now I want to
> migrate the data between these two charset.

I don't know any answers to your questions, but here is something to
read about:
http://dev.mysql.com/doc/refman/5.0/en/charset.html

Re: latin1 to utf8

am 05.06.2006 18:18:24 von chander

ALTER TABLE tablename charset='utf8';

Doesn't that work? Keep in mind that it's basically going to do what
you are doing - create a new table (with utf8 charset), copy the data
over, and rename the table.

If you need MySQL (or PostgreSQL) training, we offer a wide range of
both. (http://www.otg-nc.com)

--
Chander Ganesan
Open Technology Group, Inc.
One Copley Parkway, Suite 210
Morrisville, NC 27560
Phone: 877-258-8987/919-463-0999

ranjithkumar@gmail.com wrote:
> I am using mysql and have some data in my application in the latin1
> charset. I have a necessity to support the utf 8 charset. Now I want to
> migrate the data between these two charset.
>
> The normal way I do migration is as follows:
>
> Taking a dump of the data with the currently running mysql
> converting the necessary parameters in the mysql settings and starting
> the mysql with utf8 support
> droping the database.
> replacing latin1 to utf 8 in the dump.sql file
> loading the data back on to the mysql db.
>
>
> I am fearing of a data inconsistency in the way I do....
>
> Is the above way fool proof and will not cause any data loss or there
> is a easy way to convert things to utf8 support using mysql commands
> without using a dump.
>
> Appreciate a quick response.
>
> Thanks ,
> Ranjith