pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feediso-8859-1 and utf-8
2+ messages / 2 participants
[nested] [flat]
* iso-8859-1 and utf-8
@ 2008-09-25 07:59 Claus Guttesen <kometen@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Claus Guttesen @ 2008-09-25 07:59 UTC (permalink / raw)
To: pgsql-admin
Hi.
I found out by accident that my db-dump, at least in ver. 8.3.3,
automagically converts from iso-8859-1 to utf-8. Our db has been
around since January 2000 and iso-8859-1 was chosen back then as
encoding. When I occasionally imported the nightly dump to a test-db
it would complain very early during the import and abort if the
encoding was incorrect. I think this was also the case with 8.3.1
although I'm not certain.
Yesterday I did another import on my test-db and this was created with
utf-8 as encoding. The import did not complain and I ended up with an
utf-8-db which is what we have aimed at in the near future. Our web
had some iso-8859-1-quirks which we have solved.
I've started to plan a migration to utf-8. I assume it requires a
complete db-dump, delete the iso-8859-1-db, create an utf-8-db and do
an import. Previously I had piped the dump through iconv to convert
but this does not seem to be a requirement any longer.
--
regards
Claus
When lenity and cruelty play for a kingdom,
the gentler gamester is the soonest winner.
Shakespeare
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: iso-8859-1 and utf-8
@ 2008-09-25 08:13 Scott Marlowe <scott.marlowe@gmail.com>
parent: Claus Guttesen <kometen@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Scott Marlowe @ 2008-09-25 08:13 UTC (permalink / raw)
To: Claus Guttesen <kometen@gmail.com>; +Cc: pgsql-admin
On Thu, Sep 25, 2008 at 1:59 AM, Claus Guttesen <kometen@gmail.com> wrote:
> Hi.
>
> I found out by accident that my db-dump, at least in ver. 8.3.3,
> automagically converts from iso-8859-1 to utf-8. Our db has been
> around since January 2000 and iso-8859-1 was chosen back then as
> encoding. When I occasionally imported the nightly dump to a test-db
> it would complain very early during the import and abort if the
> encoding was incorrect. I think this was also the case with 8.3.1
> although I'm not certain.
I'm guessing that the client encoding is set to utf-8 instead of
iso-8859-1 on the client end. pg automatically converts to the client
encoding of the user connecting / environment.
I know that at least 8.2 supports the -E switch to set client encoding.
psql --help
MUCH SNIPPED:
-E, --encoding=ENCODING dump the data in encoding ENCODING
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2008-09-25 08:13 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-09-25 07:59 iso-8859-1 and utf-8 Claus Guttesen <kometen@gmail.com>
2008-09-25 08:13 ` Scott Marlowe <scott.marlowe@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox