Re: UTF characters compromising data import.

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Gavin Beau Baumanis <beau(at)palcare(dot)com(dot)au>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: UTF characters compromising data import.
Date: 2011-02-08 10:20:00
Message-ID: AANLkTimCOHRke1b-4Esrrxh_OhY-8_7KRmixeF=C1DxU@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello

2011/2/8 Gavin Beau Baumanis <beau(at)palcare(dot)com(dot)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 controlled by "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  / use the 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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Gera Mel Handumon 2011-02-08 10:28:38 Get postgresql server ip address
Previous Message Gavin Beau Baumanis 2011-02-08 10:03:01 UTF characters compromising data import.