Re: Character encoding conversion

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Mike Blackwell <maiku41(at)sbcglobal(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Character encoding conversion
Date: 2008-02-09 14:46:50
Message-ID: 20080209144649.GA16941@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2008-02-09 18:03:37 Re: Postgres Backup and Restore
Previous Message Shoaib Mir 2008-02-09 14:39:16 Re: Character encoding conversion