problem converting database to UTF-8 - Mailing list pgsql-general

From David Goodenough
Subject problem converting database to UTF-8
Date
Msg-id 200901221718.18590.david.goodenough@btconnect.com
Whole thread Raw
Responses Re: problem converting database to UTF-8  (Vladimir Konrad <vk@dsl.pipex.com>)
Re: problem converting database to UTF-8  (Schwaighofer Clemens <clemens.schwaighofer@tequila.jp>)
List pgsql-general
I have a database which was created as LATIN1 (the machine has the
wrong locales installed when I set up  PG).  It is running 8.3.

So I found various places which said the way to do this was to do
a pg_dumpall -f dump_file, get rid of the entire database, init_db -E UTF-8,
and then psql -f dumpfile.

But the psql fails saying:-

psql:dumpfile:49: ERROR:  encoding LATIN1 does not match server's locale
en_GB.UTF-8
DETAIL:  The server's LC_CTYPE setting requires encoding UTF8.

I have en_GB.UTF-8 now as my primary locale, and en_GB.ISO8859-1 is
also generated.

So I looked around again and found people saying I needed to use iconv,
but that does not help, I get the same error.

Is there a definative HOWTO that I can follow, if not does someone
have a set of instructions that will work?

If it matters I am running under Debian.

David

pgsql-general by date:

Previous
From: Grzegorz Jaśkiewicz
Date:
Subject: Re: difference between current_timestamp and now() in quotes
Next
From: Osvaldo Kussama
Date:
Subject: Resp.: difference between current_timestamp and now() in quotes