Re: Is this error correct/possible?

Поиск
Список
Период
Сортировка
От Joost Kraaijeveld
Тема Re: Is this error correct/possible?
Дата
Msg-id 1124808410.27046.49.camel@panoramix.askesis.nl
обсуждение исходный текст
Ответ на Re: Is this error correct/possible?  (Marc Herbert <Marc.Herbert@emicnetworks.com>)
Список 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
thecharacter 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: Is this error correct/possible?
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Is this error correct/possible?