Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group