pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Leonardo F <m_lists@yahoo.it>
To: pgsql-jdbc@postgresql.org
Subject: Problem with copyIn(String sql, Reader from)
Date: Thu, 8 Apr 2010 13:03:35 +0000 (GMT)
Message-ID: <234987.48841.qm@web29001.mail.ird.yahoo.com> (raw)

Hi,


I tried to use copyIn(final String sql, Reader from) but I always got weird errors:

ERROR: invalid byte sequence for encoding "UTF8": 0x00



I think there's a problem in CopyManager.java, the line:


byte[] buf = encoding.encode(new String(cbuf));


should be 

byte[] buf = encoding.encode(new String(len));


???

Otherwise the string to be encoded has always bufferSize length... filled with 0x0...


Am I right?

Everything works fine with the InputStream version.


      



view thread (4+ messages)  latest in thread

Message-ID: <234987.48841.qm@web29001.mail.ird.yahoo.com>
Permalink:  ../234987.48841.qm@web29001.mail.ird.yahoo.com/
Also on:    postgresql.org/message-id/234987.48841.qm@web29001.mail.ird.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: m_lists@yahoo.it
  Subject: Re: Problem with copyIn(String sql, Reader from)
  In-Reply-To: <234987.48841.qm@web29001.mail.ird.yahoo.com>
  References: <234987.48841.qm@web29001.mail.ird.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox