From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dion Almaer <dion@almaer.com>
Cc: pgsql-admin@postgresql.org, "'Lloyd Benson'" <lloyd@middleware-company.com>
Cc: Eric Preston <eric@middleware-company.com>
Subject: Re: Going from a DB using SQL_ASCII to UNICODE
Date: Mon, 19 Apr 2004 21:20:44 -0400
Message-ID: <2263.1082424044@sss.pgh.pa.us> (raw)
In-Reply-To: <E1BFegz-00035r-2w@server1070.gisol.com>
References: <E1BFegz-00035r-2w@server1070.gisol.com>
"Dion Almaer" <dion@almaer.com> writes:
> When we try to import the data from a SQL_ASCII dumped db, into the new
> UNICODE db, everything freaks out.
I'm no expert on this stuff, but I think what you need to do is add
set client_encoding = sql_ascii;
to the top of the dump file. (As of fairly recently, pg_dump will
automatically add such a SET, but I'm pretty sure 7.4.2 won't.)
If that doesn't help, then what you have is actually not valid UTF-8
data, and what you'll have to do is figure out what encoding it's in and
specify that instead. If it's in a mishmash of different encodings,
you're in for some pain :-(
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, dion@almaer.com, lloyd@middleware-company.com, eric@middleware-company.com
Subject: Re: Going from a DB using SQL_ASCII to UNICODE
In-Reply-To: <2263.1082424044@sss.pgh.pa.us>
References: <E1BFegz-00035r-2w@server1070.gisol.com> <2263.1082424044@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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