From: Jochen Terstiege <jochen.terstiege@quinscape.de>
To: pgsql-jdbc@postgresql.org
Subject: JDBC driver method setClob always uses getAsciiStream()
Date: Tue, 07 Sep 2010 17:31:49 +0200
Message-ID: <4C865AE5.5000906@quinscape.de> (raw)
Using driver: postgresql-8.4-701.jdbc3.jar
The method setClob() in the AbstractJdbc2Statement calls the method
getAsciiStream() on the provided Clob. This leads to problems if the
given Clob contains an UTF-8 encoded string.
Shouldn't the driver call getCharacterStream() instead? Can this problem
be solved in a different way?
Relevant code from the class:
public void setClob(int i, Clob x) throws SQLException
{
checkClosed();
if (x == null)
{
setNull(i, Types.CLOB);
return;
}
InputStream l_inStream = x.getAsciiStream();
...
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: jochen.terstiege@quinscape.de
Subject: Re: JDBC driver method setClob always uses getAsciiStream()
In-Reply-To: <4C865AE5.5000906@quinscape.de>
References: <4C865AE5.5000906@quinscape.de>
* 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