Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5EFD2633AAC for ; Thu, 8 Apr 2010 10:34:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 11276-09 for ; Thu, 8 Apr 2010 13:34:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from web29010.mail.ird.yahoo.com (web29010.mail.ird.yahoo.com [212.82.110.149]) by mail.postgresql.org (Postfix) with SMTP id 035C8632A1A for ; Thu, 8 Apr 2010 10:34:15 -0300 (ADT) Received: (qmail 8647 invoked by uid 60001); 8 Apr 2010 13:34:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.it; s=s1024; t=1270733654; bh=JofUqj3M0KSSEkepM94FQAEu21tn5yGygvqNcwW4XUc=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=RlcLwoawnjubArbTnxUds+yLTVr/OErI4jrxo5Do8VX/zuW/2oQM9KWePKRPFinMClen6a5n1X4O4wG7pFxIlFa4Onsz04t6A75xBuqlySBz0li+p1q/8HcEUIK7JhFNUFRHHFE7OD3ZAlYHsqd3rZ462r+v7yBHIRX2cpCHlWc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.it; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=sgTx8k/jEWNazC9Vglv8qN89bV5Q/NFniZyzLY6OkAuvkk7rUM5udq5UIwIYMmskrWFspqoLOhbDHwTdAHiUe/xmRW10TU0+siIUOVdS6nJRXHROesoBwbLUx0Pg2jaX079f89ioFa7iXC0PkWZbRKs93jMWglEod9qyHMhX0yo=; Message-ID: <151556.7059.qm@web29010.mail.ird.yahoo.com> X-YMail-OSG: kgMPv4AVM1kWm3mDbEYPSb2DvT86bv6EWph55KJHeLhQX6Z 4NPxqfTmIt1Kj9jStfRx07dKDMNW9Ant.vTH4LEs_PfuH41NLjTQtSvJRhMh sy5tk2_Or4M8XSB3GGI2KWUdM5KBdUTIqSwM0DtO5u.WRbdvYi1TFxfYUkWy 3LRaqroS_C2rsukTcQ4c.jvb9aQTEolJ2FxqZxlmD7ob10S6zEY1V4c4bsvH NGlop5ypZVZ978QGvIQ3nIePdR75e69iuf1w- Received: from [85.33.62.89] by web29010.mail.ird.yahoo.com via HTTP; Thu, 08 Apr 2010 13:34:13 GMT X-Mailer: YahooMailRC/324.3 YahooMailWebService/0.8.100.260964 References: <234987.48841.qm@web29001.mail.ird.yahoo.com> Date: Thu, 8 Apr 2010 13:34:13 +0000 (GMT) From: Leonardo F Subject: Re: Problem with copyIn(String sql, Reader from) To: pgsql-jdbc@postgresql.org In-Reply-To: <234987.48841.qm@web29001.mail.ird.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.824 tagged_above=-10 required=5 tests=AWL=-0.825, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201004/9 X-Sequence-Number: 20420 Sorry, I meant=0A=0Abyte[] buf =3D encoding.encode(new String(cbuf, 0, len)= ); =0A=0A=0A=0A----- Messaggio originale -----=0A> Da: Leonardo F =0A> A: pgsql-jdbc@postgresql.org=0A> Inviato: Gio 8 aprile 2010, = 15:03:35=0A> Oggetto: [JDBC] Problem with copyIn(String sql, Reader from)= =0A> =0A> Hi,=0A=0A=0AI tried to use copyIn(final String sql, Reader from) = but I always =0A> got weird errors:=0A=0AERROR: invalid byte sequence for e= ncoding "UTF8": =0A> 0x00=0A=0A=0A=0AI think there's a problem in CopyManag= er.java, the =0A> line:=0A=0A=0Abyte[] buf =3D encoding.encode(new =0A> Str= ing(cbuf));=0A=0A=0Ashould be =0A=0Abyte[] buf =3D encoding.encode(new =0A>= String(len));=0A=0A=0A???=0A=0AOtherwise the string to be encoded has =0A>= always bufferSize length... filled with 0x0...=0A=0A=0AAm I =0A> right?=0A= =0AEverything works fine with the InputStream =0A> version.=0A=0A=0A