Re: UTF characters compromising data import. - Mailing list pgsql-sql

From Pavel Stehule
Subject Re: UTF characters compromising data import.
Date
Msg-id AANLkTimCOHRke1b-4Esrrxh_OhY-8_7KRmixeF=C1DxU@mail.gmail.com
Whole thread Raw
In response to UTF characters compromising data import.  (Gavin Beau Baumanis <beau@palcare.com.au>)
List pgsql-sql
Hello

2011/2/8 Gavin Beau Baumanis <beau@palcare.com.au>:
> Hi Everyone,
>
> I am trying to import some data (provided to us from an external source) from a CSV file using "\copy ...."
>
> But I get the following error message;
> invalid byte sequence for encoding "UTF8": 0xfd
> HINT:  This error can also happen if the byte sequence does not match the encoding expected by the server, which is
controlledby "client_encoding". 
>
> I understand the error message - but what I don't know is what I need to set the encoding to - in order to import  /
usethe data. 
>

is impossible to import data without knowledge of encoding.

you can use a some utils, that try to select a encoding

http://linux.die.net/man/1/enca

Regards

Pavel Stehule


> As always - thanks in advance for any help you might be able to provide.
>
>
> Gavin "Beau" Baumanis
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>


pgsql-sql by date:

Previous
From: Gavin Beau Baumanis
Date:
Subject: UTF characters compromising data import.
Next
From: Gera Mel Handumon
Date:
Subject: Get postgresql server ip address