Re: Character encoding conversion

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
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:39:16
Message-ID: bf54be870802090639l337226c6lef896837da71718e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Feb 9, 2008 7:28 PM, Mike Blackwell <maiku41(at)sbcglobal(dot)net> 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.
>
> 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?
>
>

Try using 'iconv' for your dump file and convert it all to UTF8 first before
restoring to a UTF8 database.

--
Shoaib Mir
Fujitsu Australia Software Technology
shoaibm[(at)]fast(dot)fujitsu(dot)com(dot)au

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Fuhr 2008-02-09 14:46:50 Re: Character encoding conversion
Previous Message Mike Blackwell 2008-02-09 14:28:58 Character encoding conversion