Re: BUG #5944: COPY FROM doesn't work with international characters

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5944: COPY FROM doesn't work with international characters
Date: 2011-10-19 12:41:26
Message-ID: CA+Tgmoa1J9oRBAxqU3riqKaJDxv9-YkNaHk0oN-TvJZzf787HA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Sep 6, 2011 at 12:48 PM, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Josh Berkus wrote:
>> I have another example of this issue with WIN1252.  This line in a copy
>> file:
>>
>> 659446  828     1       /6???\bH(at)^W^Za$H???\b???@\\/    <p><p></p><p>No
>> valid or unique HTTP objects found in XML response.</p></p>
>>
>> Into this table:
>>
>>      Table "public.ep_tests"
>> Column  |     Type     | Modifiers
>> ---------+--------------+-----------
>> id      | bigint       | not null
>> v_id    | integer      | not null
>> status  | character(1) | not null
>> vkey    | text         |
>> details | text         |
>>
>> Results in this error while loading the data:
>>
>> the following error is encounted by the \copy: ERROR:  missing data for
>> column "details"
>> CONTEXT:  COPY ep_tests, line 1028752: "659446  828     1       /6???\bH(at)?"
>>
>> The dump file was produced by using 9.0.3's pg_dump in text mode to dump
>> an 8.2 database, then using 9.0.3's psql to load the file.  Both servers
>> are UTF8, locale WIN1252.
>>
>> So it looks like we're not successfully escaping characters on WIN1252.
>>  The characters in question are also latin characters.
>>
>> We've reproduced this on a clean install.
>
> Has this been fixed?

I don't think so. It's not really clear to me what the issue is. Is
there some confusion between the encoding of the file and the encoding
in use in the client session? It's odd that we would have a bug that
only affects win1252.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2011-10-19 12:42:39 Re: BUG #6195: Cannot install any of the installers - TEMP or VC++ Errors
Previous Message Robert Haas 2011-10-19 12:36:26 Re: Can't use WITH in a PERFORM query in PL/pgSQL?