pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: Nathan Davalos <n.davalos@sharedmarketing.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #5944: COPY FROM doesn't work with international characters
Date: Wed, 23 Mar 2011 16:49:03 -0700
Message-ID: <4D8A86EF.6020502@hogranch.com> (raw)
In-Reply-To: <201103232332.p2NNWwRn083987@wwwmaster.postgresql.org>
References: <201103232332.p2NNWwRn083987@wwwmaster.postgresql.org>

On 03/23/11 4:32 PM, Nathan Davalos wrote:
> ...
> SET CLIENT_ENCODING TO 'WIN1251';
> copy tmpintermediate from 'thefile.txt';
>
>
> Sample contents of thefile:
> 230002	Alto Desempeño, S.A. De C.V.
>
> When using WIN1251 or WIN1252 I get nothing in the second field, it just
> ignores the data. Same thing for LATIN-1.
>
> When using UTF8 for client encoding I get this message:
> ERROR:  invalid byte sequence for encoding "UTF8": 0xf16f2c20
> CONTEXT:  COPY tmpintermediate , line 1

what is the byte (binary) encoding of the file?  in hex,

ñ in win1251  == (no such character.    win1251 is cyrillic)
ñ in win1252  == F1
ñ in UTF-8    == C3 B1





  





view thread (10+ messages)  latest in thread

Message-ID: <4D8A86EF.6020502@hogranch.com>
Permalink:  ../4D8A86EF.6020502@hogranch.com/
Also on:    postgresql.org/message-id/4D8A86EF.6020502@hogranch.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: pierce@hogranch.com, n.davalos@sharedmarketing.com
  Subject: Re: BUG #5944: COPY FROM doesn't work with international characters
  In-Reply-To: <4D8A86EF.6020502@hogranch.com>
  References: <201103232332.p2NNWwRn083987@wwwmaster.postgresql.org> <4D8A86EF.6020502@hogranch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox