Re: Very strange Error in Updates - Mailing list pgsql-jdbc

From Dario V. Fassi
Subject Re: Very strange Error in Updates
Date
Msg-id 40F61DED.9090609@sistemat.com.ar
Whole thread Raw
In response to Re: Very strange Error in Updates  (Kris Jurka <books@ejurka.com>)
Responses Re: Very strange Error in Updates
List pgsql-jdbc
Kris Jurka wrote:
On Thu, 15 Jul 2004, Dario V. Fassi wrote: 
When the parameter fill the full-length of  receiving field and has any 
non common character, the update throw a exception like:

java.sql.SQLException: ERROR:  value too long for type character varying(30)   
This is likely an encoding problem.  What is the encoding of the database?  
I'm guessing it's SQL_ASCII and you when entering data from java which is 
in unicode it takes more than one byte of storage which is represented as 
more than one character in an ascii database so it goes over the limit.

Kris Jurka 
Kris, the value of field is originate from a DB2 v6.1 with encoding IBM-850 (Ascii PC), I don't believe that the value are unicode.

But if it's unicode , how can I get sure of that, and What can be done to workaround that problem ?

Dario.

pgsql-jdbc by date:

Previous
From: "Dario V. Fassi"
Date:
Subject: Re: Very strange Error in Updates
Next
From: Kris Jurka
Date:
Subject: Re: Very strange Error in Updates