From: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
To: Marc Herbert <Marc.Herbert@emicnetworks.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: Is this error correct/possible?
Date: Tue, 23 Aug 2005 16:46:50 +0200
Message-ID: <1124808410.27046.49.camel@panoramix.askesis.nl> (raw)
In-Reply-To: <87slx0n51e.fsf@meije.emic.fr>
References: <1124790915.27046.25.camel@panoramix.askesis.nl>
<87slx0n51e.fsf@meije.emic.fr>
On Tue, 2005-08-23 at 15:42 +0200, Marc Herbert wrote:
> Could you copy/paste the complete exception and stacktrace?
Invalid character data was found. This is most likely caused by stored data containing characters that are invalid for the character set the database was created in. The most common example of this is storing 8bit data in a SQL_ASCII database.
org.postgresql.util.PSQLException: Invalid character data was found.
This is most likely caused by stored data containing characters that are
invalid for the character set the database was created in. The most
common example of this is storing 8bit data in a SQL_ASCII database.
at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:1904)
at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:2203)
at nl.muntpost.MuntpostApp.main(MuntpostApp.java:42)
Caused by: java.io.IOException: UTF-8 string representation was
truncated
at org.postgresql.core.Encoding.decodeUTF8(Encoding.java:304)
at org.postgresql.core.Encoding.decode(Encoding.java:179)
at org.postgresql.core.Encoding.decode(Encoding.java:193)
at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:1900)
... 2 more
> > Inspection of the row (using pgadmin3) shows that there is the char "ü"
> > in a char(40) columns.
> >
> > Questions:
> >
> > 1. Is a "ü" allowed in a SQL_ASCII database and a column of char(40)?
>
> From a very recent discussion on pgsql-Odbc (check the archive), it is
> not allowed. Not allowed "anymore" from what I got. Which is quite
> sensible considering that ü is not ASCII: how would you sort it, upper
> it, etc.? I did not get if this has been recently enforced by the ODBC
> driver, the engine, both... check the archive.
OK, this is what I expected.
>
> > 2. If so, is this a JDBC bug?
>
> The stacktrace and such debug stuff would help tracking what JDBC is
> doing here.
See above.
>
> > 3. If not, is this a PostgreSQL bug, allowing a non-allowed character in
> > a column?
>
> Maybe it was allowed in 747, not anymore in 8.0.3 ?
From another mail I understood that is this is just the way it is.
Joost
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: J.Kraaijeveld@Askesis.nl, Marc.Herbert@emicnetworks.com
Subject: Re: Is this error correct/possible?
In-Reply-To: <1124808410.27046.49.camel@panoramix.askesis.nl>
References: <1124790915.27046.25.camel@panoramix.askesis.nl> <87slx0n51e.fsf@meije.emic.fr> <1124808410.27046.49.camel@panoramix.askesis.nl>
* 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