Howto read a UTF-8 CSV with COPY?

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Howto read a UTF-8 CSV with COPY?
Date: 2010-11-11 22:01:49
Message-ID: 4CDC67CD.30004@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
I'd like to import some data from ms-office that has text columns with
international characters in it.

COPY complains about illegal byte sequences.

When I placed a "set client_encoding = LATIN1" in front of the COPY
command, COPY was happy.
It still didn't work as expected. There were empty attributes in the
imported table when there were accent decorated characters in the source
file.

Is there a way to import UTF8 encoded csv files ?

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message LazyTrek 2010-11-12 06:26:23 Re: Howto read a UTF-8 CSV with COPY?
Previous Message Bastiaan Olij 2010-11-11 20:48:22 Interesting install issues on Windows 2003 domain server