Hi,

On Mon, 07 Nov 2005 12:25:22 +0100
Khan <[EMAIL PROTECTED]> wrote:

> Bruno Lustosa wrote:
> > On 11/7/05, *Khan* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
> > 
> >     I'm trying to convert my windows-1250 database to Unicode, UTF-8. Is
> >     there any script that can do the job?
> > 
> > What kind of database is it?
> > If it's something the likes of postgresql or mysql, you could dump the 
> > database to a text file, use recode or iconv to change the file 
> > encoding, and then import it into a new unicode database.
> 
> Yes, that's just what I want to do. Database is MySQL. Can you PLS 
> explain procedure, I have never done that before.

$ mysqldump -u root -p MyDataBase | iconv -f WINDOWS-1250 -t UTF-8 > mydump.sql

But beware, this might have big influence or lead to an application not
working anymore depending on the assumptions that application makes.

E.g., for some of my PHP applications store serialized data in
dedicated fields. This depends on the binary content of those fields
not being modified due to string length information stored within those
fields. When converting to UTF-8, the multi byte sequences would
corrupt each of these serialized strings. If I were to convert this to
another charset, I had to do it programmatically by using functions of
the application, not the DB itself.

-hwh
-- 
gentoo-user@gentoo.org mailing list

Reply via email to