From: Hans-Werner Hilse <hilse@web.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Convert windows-1250 database to UTF-8
Date: Mon, 7 Nov 2005 15:39:54 +0100 [thread overview]
Message-ID: <20051107153954.2a4a89e4.hilse@web.de> (raw)
In-Reply-To: <436F39A2.8000706@lsinter.net>
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
next prev parent reply other threads:[~2005-11-07 14:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2005-11-07 19:41 ` Renat Golubchyk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051107153954.2a4a89e4.hilse@web.de \
--to=hilse@web.de \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox