* [gentoo-user] Convert windows-1250 database to UTF-8
@ 2005-11-07 11:07 Khan
2005-11-07 11:19 ` Bruno Lustosa
0 siblings, 1 reply; 5+ messages in thread
From: Khan @ 2005-11-07 11:07 UTC (permalink / raw
To: gentoo-user
Hello,
I'm trying to convert my windows-1250 database to Unicode, UTF-8. Is
there any script that can do the job?
TNX
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Convert windows-1250 database to UTF-8
2005-11-07 11:07 [gentoo-user] Convert windows-1250 database to UTF-8 Khan
@ 2005-11-07 11:19 ` Bruno Lustosa
2005-11-07 11:25 ` Khan
0 siblings, 1 reply; 5+ messages in thread
From: Bruno Lustosa @ 2005-11-07 11:19 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
On 11/7/05, Khan <nbv.sa@lsinter.net> 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.
--
Bruno Lustosa, aka Lofofora | Email: bruno@lustosa.net
Network Administrator/Web Developper | ICQ: 1406477
Rio de Janeiro - Brazil |
[-- Attachment #2: Type: text/html, Size: 999 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Convert windows-1250 database to UTF-8
2005-11-07 11:19 ` Bruno Lustosa
@ 2005-11-07 11:25 ` Khan
2005-11-07 14:39 ` Hans-Werner Hilse
2005-11-07 19:41 ` Renat Golubchyk
0 siblings, 2 replies; 5+ messages in thread
From: Khan @ 2005-11-07 11:25 UTC (permalink / raw
To: gentoo-user
Bruno Lustosa wrote:
> On 11/7/05, *Khan* <nbv.sa@lsinter.net <mailto:nbv.sa@lsinter.net>> 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.
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Convert windows-1250 database to UTF-8
2005-11-07 11:25 ` Khan
@ 2005-11-07 14:39 ` Hans-Werner Hilse
2005-11-07 19:41 ` Renat Golubchyk
1 sibling, 0 replies; 5+ messages in thread
From: Hans-Werner Hilse @ 2005-11-07 14:39 UTC (permalink / raw
To: gentoo-user
Hi,
On Mon, 07 Nov 2005 12:25:22 +0100
Khan <nbv.sa@lsinter.net> wrote:
> Bruno Lustosa wrote:
> > On 11/7/05, *Khan* <nbv.sa@lsinter.net <mailto:nbv.sa@lsinter.net>> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] Convert windows-1250 database to UTF-8
2005-11-07 11:25 ` Khan
2005-11-07 14:39 ` Hans-Werner Hilse
@ 2005-11-07 19:41 ` Renat Golubchyk
1 sibling, 0 replies; 5+ messages in thread
From: Renat Golubchyk @ 2005-11-07 19:41 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]
On Mon, 07 Nov 2005 12:25:22 +0100 Khan <nbv.sa@lsinter.net> wrote:
> Bruno Lustosa wrote:
> > On 11/7/05, *Khan* <nbv.sa@lsinter.net <mailto:nbv.sa@lsinter.net>>
> > 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.
As far as I know you can change the character set directly in MySQL.
The data will be converted automagically. For example,
ALTER TABLE foo DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci
You can create a new table and test it with some garbage data before you
do this. And create a backup ;-)
Cheers,
Renat
--
Probleme kann man niemals mit derselben Denkweise loesen,
durch die sie entstanden sind.
(Einstein)
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-11-07 20:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-07 11:07 [gentoo-user] Convert windows-1250 database to UTF-8 Khan
2005-11-07 11:19 ` Bruno Lustosa
2005-11-07 11:25 ` Khan
2005-11-07 14:39 ` Hans-Werner Hilse
2005-11-07 19:41 ` Renat Golubchyk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox