pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Kempter <kevin@kevinkempterllc.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_restore errors
Date: Mon, 21 Jan 2008 21:49:25 -0500
Message-ID: <23912.1200970165@sss.pgh.pa.us> (raw)
In-Reply-To: <200801211806.57989.kevin@kevinkempterllc.com>
References: <200801211806.57989.kevin@kevinkempterllc.com>

Kevin Kempter <kevin@kevinkempterllc.com> writes:
> Trying to restore a pg_dump I get this:
> pg_restore: ERROR:  invalid byte sequence for encoding "UTF8": 0xae
> HINT:  This error can also happen if the byte sequence does not match the 
> encoding expected by the server, which is controlled by "client_encoding".

> This is a dump file that was handed to me from a client. I don't know
> anything about what the dump flags were or what the db encoding
> was. Is there a way to find out (I'm assuming this is an encoding
> mis-match) from the dump file.

Well, the fact that you got that message says that the original database
was, or thought it was, in UTF8 encoding: pg_dump would have propagated
that fact into a "set client_encoding" command in the dump script.

I suppose that this data got loaded into the database while it was being
run by one of the early 8.1.x releases that didn't check encoding very
carefully :-(.  You're going to have to guess what the real encoding is;
querying the client about his typical locale settings might help.

When trying to fix up the data, keep in mind that what you have now is
likely a mix of real UTF8 and whatever-this-is.

			regards, tom lane



view thread (3+ messages)

Message-ID: <23912.1200970165@sss.pgh.pa.us>
Permalink:  ../23912.1200970165@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23912.1200970165@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kevin@kevinkempterllc.com
  Subject: Re: pg_restore errors
  In-Reply-To: <23912.1200970165@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