invalid byte sequence for encoding "UTF8": 0x00

From: "James Im" <im-james(at)hotmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: invalid byte sequence for encoding "UTF8": 0x00
Date: 2007-02-20 10:48:43
Message-ID: BAY7-F17FFE0E324AB3B642C547E96890@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-jdbc

Hi,

I've got another problem. I sometimes get the following SQLException
when doing an insert:

ERROR: invalid byte sequence for encoding "UTF8": 0x00
Exception: org.postgresql.util.PSQLException
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1525)
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1309)
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452)
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:354)
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:308)

By the way, the insert is done with a PreparedStatement and I use only
setLong(), setString(), setTimestamp() and setInt().

I don't understand it very well. It is obviously an encoding exception
but I don't know why it happens and what I could do avoid it.

Any idea?

_________________________________________________________________
Opret en personlig blog og del dine billeder p MSN Spaces:
http://spaces.msn.com/

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Altaf Malik 2007-02-20 10:57:07 Re: invalid byte sequence for encoding "UTF8": 0x00
Previous Message Tom Lane 2007-02-20 02:40:09 Re: log_duration?

Browse pgsql-jdbc by date

  From Date Subject
Next Message Heikki Linnakangas 2007-02-20 10:50:50 Re: how to continue using a connection after an error with autocommit=false
Previous Message James Im 2007-02-20 10:41:37 how to continue using a connection after an error with autocommit=false