Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 0A9DE9F967A for ; Mon, 20 Aug 2007 11:18:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 99587-05-2 for ; Mon, 20 Aug 2007 11:18:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by postgresql.org (Postfix) with ESMTP id 8DFD19F966E for ; Mon, 20 Aug 2007 11:18:31 -0300 (ADT) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IN85N-0005PW-Tu for pgsql-jdbc@postgresql.org; Mon, 20 Aug 2007 07:18:29 -0700 Message-ID: <12236825.post@talk.nabble.com> Date: Mon, 20 Aug 2007 07:18:29 -0700 (PDT) From: ttvvaa To: pgsql-jdbc@postgresql.org Subject: JDBC COPY error encoding MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: ttvvaa@gmail.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.63 tagged_above=0 required=5 tests=BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13, WHOIS_MYPRIVREG=1.499 X-Spam-Level: ** X-Archive-Number: 200708/84 X-Sequence-Number: 17397 I use PostgreSQL 8.2 for WinXP (SP2). I try to use "postgresql-jdbc-8.2-505-copy-20070719.jdbc3.jar" (from http://kato.iki.fi/sw/db/postgresql/jdbc/copy/): FileInputStream fs = new FileInputStream("D://t.txt"); ((PGConnection)con).getCopyAPI().copyIntoDB("COPY table1 FROM STDIN", fs); fs.close(); but have error: 'org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0xa0'. file 'D://t.txt' used WIN866 encoding. DB used UTF8 encoding. Command successfully runs in psql-console: set client_encoding to WIN866; copy table1(nn) from 'd://t.txt'; How can I solve this problem? -- View this message in context: http://www.nabble.com/JDBC-COPY-error-encoding-tf4299167.html#a12236825 Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.