Skip site navigation (1) Skip section navigation (2)

Re: invalid byte sequence for encoding "UTF8": 0x00

From: Altaf Malik <mmalik_altaf(at)yahoo(dot)com>
To: James Im <im-james(at)hotmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: invalid byte sequence for encoding "UTF8": 0x00
Date: 2007-02-20 10:57:07
Message-ID: (view raw or flat)
Lists: pgsql-jdbc
Try to change the encoding of your database to "Unicode". 
  I hope this helps.
  --Altaf Malik
James Im <im-james(at)hotmail(dot)com> wrote:

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

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:

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly

Don't get soaked.  Take a quick peak at the forecast 
 with theYahoo! Search weather shortcut.

In response to


pgsql-jdbc by date

Next:From: Csaba NagyDate: 2007-02-20 11:13:39
Subject: Re: invalid byte sequence for encoding "UTF8": 0x00
Previous:From: Altaf MalikDate: 2007-02-20 10:53:46
Subject: Re: how to continue using a connection after an error with autocommit=false

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group