From: | Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> |
---|---|
To: | Marc Herbert <Marc(dot)Herbert(at)emicnetworks(dot)com> |
Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: Is this error correct/possible? |
Date: | 2005-08-23 14:46:50 |
Message-ID: | 1124808410.27046.49.camel@panoramix.askesis.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Joost Kraaijeveld | 2005-08-23 14:50:54 | Re: Is this error correct/possible? |
Previous Message | Kris Jurka | 2005-08-23 14:34:31 | Re: Is this error correct/possible? |