Re: Howto read a UTF-8 CSV with COPY?

From: LazyTrek <lazytrek(at)gmail(dot)com>
To: Andreas <maps(dot)on(at)gmx(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Howto read a UTF-8 CSV with COPY?
Date: 2010-11-12 06:26:23
Message-ID: AANLkTik0=WGZYqD0uqNif5cV1XaJsV_ihLmnvY=f1hQ4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Andreas,

Have you looked at using pgloader?

http://pgloader.projects.postgresql.org

Also did you save the MS Office file as a simple plain text file?

I'm a novice myself but do know that this offers slightly more advanced
options than the simple COPY utility.

On Thu, Nov 11, 2010 at 10:01 PM, Andreas <maps(dot)on(at)gmx(dot)net> wrote:

> 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 ?
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message LazyTrek 2010-11-12 06:31:36 Re: CSVLOG fields
Previous Message Andreas 2010-11-11 22:01:49 Howto read a UTF-8 CSV with COPY?