1 |
On Mon, 07 Nov 2005 12:25:22 +0100 Khan <nbv.sa@×××××××.net> wrote: |
2 |
> Bruno Lustosa wrote: |
3 |
> > On 11/7/05, *Khan* <nbv.sa@×××××××.net <mailto:nbv.sa@×××××××.net>> |
4 |
> > wrote: |
5 |
> > |
6 |
> > > I'm trying to convert my windows-1250 database to Unicode, |
7 |
> > > UTF-8. Is there any script that can do the job? |
8 |
> > |
9 |
> > What kind of database is it? |
10 |
> > If it's something the likes of postgresql or mysql, you could dump |
11 |
> > the database to a text file, use recode or iconv to change the file |
12 |
> > encoding, and then import it into a new unicode database. |
13 |
> |
14 |
> Yes, that's just what I want to do. Database is MySQL. Can you PLS |
15 |
> explain procedure, I have never done that before. |
16 |
|
17 |
As far as I know you can change the character set directly in MySQL. |
18 |
The data will be converted automagically. For example, |
19 |
|
20 |
ALTER TABLE foo DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci |
21 |
|
22 |
You can create a new table and test it with some garbage data before you |
23 |
do this. And create a backup ;-) |
24 |
|
25 |
|
26 |
Cheers, |
27 |
Renat |
28 |
|
29 |
-- |
30 |
Probleme kann man niemals mit derselben Denkweise loesen, |
31 |
durch die sie entstanden sind. |
32 |
(Einstein) |