pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mike Blackwell <maiku41@sbcglobal.net>
Cc: pgsql-admin@postgresql.org
Subject: Re: Character encoding conversion
Date: Sat, 09 Feb 2008 13:14:35 -0500
Message-ID: <25696.1202580875@sss.pgh.pa.us> (raw)
In-Reply-To: <47ADB8AA.6070305@sbcglobal.net>
References: <47ADB8AA.6070305@sbcglobal.net>

Mike Blackwell <maiku41@sbcglobal.net> writes:
> 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.

How exactly did you move the data?  And what PG version are we talking
about?

> 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?

If you've got client_encoding and server_encoding set up correctly,
it should happen automatically during the COPY.  I think you messed
that up somehow, but it's not clear just how.

			regards, tom lane



view thread (4+ messages)

Message-ID: <25696.1202580875@sss.pgh.pa.us>
Permalink:  ../25696.1202580875@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25696.1202580875@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, maiku41@sbcglobal.net
  Subject: Re: Character encoding conversion
  In-Reply-To: <25696.1202580875@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