Re: Character encoding conversion - Mailing list pgsql-admin

From Michael Fuhr
Subject Re: Character encoding conversion
Date
Msg-id 20080209144649.GA16941@winnie.fuhr.org
Whole thread Raw
In response to Character encoding conversion  (Mike Blackwell <maiku41@sbcglobal.net>)
List pgsql-admin
On Sat, Feb 09, 2008 at 08:28:58AM -0600, Mike Blackwell wrote:
> I have a database which was originally created with LATIN1 encoding.
> I'd like to move it to UTF8.  The data will load ok (COPY)  but I am
> getting 'invalid byte sequence for encoding..." messages when accessing
> the data.

What's the complete error message?  What's the output of the following
query in a session that gets the error?

select name, setting from pg_settings where name ~ 'encoding';

> Is there a way to automatically convert the offending characters, or to
> easily locate them in a pg_dump file so they can be converted by hand?

You said the data loaded without error, right?  Let's see if we can
figure out why queries are failing before considering what corrective
action to take.

--
Michael Fuhr

pgsql-admin by date:

Previous
From: "Shoaib Mir"
Date:
Subject: Re: Character encoding conversion
Next
From: Tom Lane
Date:
Subject: Re: Postgres Backup and Restore