X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6174FD1B174 for ; Thu, 15 Jul 2004 02:53:13 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 00762-09 for ; Thu, 15 Jul 2004 05:53:11 +0000 (GMT) Received: from mail.svhost.com.ar (mail.svhost.com.ar [200.80.239.22]) by svr1.postgresql.org (Postfix) with ESMTP id 1371CD1B16E for ; Thu, 15 Jul 2004 02:53:03 -0300 (ADT) Received: from sistemat.com.ar (devel.sistemat.com.ar [192.168.1.40]) by mail.svhost.com.ar (Postfix) with ESMTP id 451702341F; Thu, 15 Jul 2004 02:51:35 -0300 (ART) Message-ID: <40F61DED.9090609@sistemat.com.ar> Date: Thu, 15 Jul 2004 03:02:21 -0300 From: "Dario V. Fassi" Organization: SISTEMATICA ingenieria de software srl User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: es, es-ar, en-us, en MIME-Version: 1.0 To: Kris Jurka Cc: "pgsql-jdbc@postgresql.org" Subject: Re: Very strange Error in Updates References: <40F6172D.10301@sistemat.com.ar> In-Reply-To: Content-Type: multipart/alternative; boundary="------------090707050408060104020304" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.0 tagged_above=0.0 required=5.0 tests=HTML_20_30, HTML_MESSAGE, HTML_TITLE_EMPTY X-Spam-Level: * X-Archive-Number: 200407/171 X-Sequence-Number: 10555 This is a multi-part message in MIME format. --------------090707050408060104020304 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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. --------------090707050408060104020304 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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.
--------------090707050408060104020304--