Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id F3C76B5DEE5 for ; Tue, 6 Sep 2011 13:49:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 08378-09-2 for ; Tue, 6 Sep 2011 16:49:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from momjian.us (momjian.us [70.90.9.53]) by mail.postgresql.org (Postfix) with ESMTP id 554ADB5DD5E for ; Tue, 6 Sep 2011 13:48:59 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id p86GmtH04943; Tue, 6 Sep 2011 12:48:55 -0400 (EDT) From: Bruce Momjian Message-Id: <201109061648.p86GmtH04943@momjian.us> Subject: Re: BUG #5944: COPY FROM doesn't work with international characters In-Reply-To: <4D8B9332.80308@agliodbs.com> To: Josh Berkus Date: Tue, 6 Sep 2011 12:48:55 -0400 (EDT) CC: pgsql-bugs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/47 X-Sequence-Number: 31064 Josh Berkus wrote: > I have another example of this issue with WIN1252. This line in a copy > file: > > 659446 828 1 /6???\bH@^W^Za$H???\b???@\\/

No > valid or unique HTTP objects found in XML response.

> > 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@?" > > 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? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. +