Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2A1A2633C00 for ; Wed, 22 Jul 2009 13:36:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 23943-03 for ; Wed, 22 Jul 2009 13:35:58 -0300 (ADT) X-Greylist: delayed 00:05:20.639397 by SQLgrey-1.7.6 Received: from mailbackup.inode.at (mailbackup.inode.at [213.229.60.24]) by mail.postgresql.org (Postfix) with ESMTP id A733363372F for ; Wed, 22 Jul 2009 13:35:58 -0300 (ADT) Received: from [62.99.145.5] (port=63938 helo=mx.inode.at) by mailbackup.inode.at with esmtp (Exim 4.67) (envelope-from ) id 1MTeiC-0001VK-VK for pgsql-jdbc@postgresql.org; Wed, 22 Jul 2009 18:30:36 +0200 Received: from [83.64.182.18] (port=10410 helo=donald.apus.co.at) by smartmx-05.inode.at with esmtp (Exim 4.69) (envelope-from ) id 1MTei5-0000rn-Pb for pgsql-jdbc@postgresql.org; Wed, 22 Jul 2009 18:30:29 +0200 Received: from localhost (localhost [127.0.0.1]) by donald.apus.co.at (Postfix) with ESMTP id 27E213EA014 for ; Wed, 22 Jul 2009 18:30:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at donald.apus.co.at Received: from donald.apus.co.at ([127.0.0.1]) by localhost (donald.apus.co.at [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xPGbZ3PRb8fz for ; Wed, 22 Jul 2009 18:30:25 +0200 (CEST) Received: from donald.apus.co.at (localhost [127.0.0.1]) by donald.apus.co.at (Postfix) with ESMTP id CFB2D3EA00E for ; Wed, 22 Jul 2009 18:30:25 +0200 (CEST) Date: Wed, 22 Jul 2009 17:30:25 +0100 (GMT+01:00) From: Markus Kickmaier To: pgsql-jdbc@postgresql.org Message-ID: <9709844.92821248280225595.JavaMail.root@donald.apus.co.at> In-Reply-To: <10290395.92801248279719869.JavaMail.root@donald.apus.co.at> Subject: Encoding from CopyManager.copyIn() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [195.34.153.33] X-Mailer: Zimbra 5.0.16_GA_2921.UBUNTU8 (ZimbraWebClient - FF3.0 (Win)/5.0.16_GA_2921.UBUNTU8) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=-10 required=5 tests=none X-Spam-Level: X-Archive-Number: 200907/53 X-Sequence-Number: 19821 Hello, I'm using the copyIn() function of the CopyManager. It works fine until I d= on't use an "umlaut" like =C3=BC. Then i get an PSQLException: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encodin= g "UTF8": 0xfc My code looks like follows: ByteArrayOutputStream output =3D new ByteArrayOutputStream(); PrintWriter writer =3D new PrintWriter(output); writer.println("abc=C3=BC=C3=A4=C3=B6"); writer.flush(); ByteArrayInputStream input =3D new ByteArrayInputStream(output.toByteArray(= )); long result =3D ((PGConnection) con_).getCopyAPI().copyIn(statement, input)= ; After searching at google i found out that this is an encoding problem. The= database doesn't know what charset I'm using. Any suggestion how i can specify the encoding i want to use? BR, Markus