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 DE576D1B198 for ; Thu, 15 Jul 2004 03:25:35 -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 14153-01 for ; Thu, 15 Jul 2004 06:25:41 +0000 (GMT) Received: from mail.svhost.com.ar (mail.svhost.com.ar [200.80.239.22]) by svr1.postgresql.org (Postfix) with ESMTP id BF15FD1B18E for ; Thu, 15 Jul 2004 03:25:30 -0300 (ADT) Received: from sistemat.com.ar (devel.sistemat.com.ar [192.168.1.40]) by mail.svhost.com.ar (Postfix) with ESMTP id 855DD2341F; Thu, 15 Jul 2004 03:24:01 -0300 (ART) Message-ID: <40F62587.1040101@sistemat.com.ar> Date: Thu, 15 Jul 2004 03:34:47 -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" , Oliver Jowett Subject: Re: Very strange Error in Updates References: <40F6172D.10301@sistemat.com.ar> <40F61DED.9090609@sistemat.com.ar> In-Reply-To: Content-Type: multipart/alternative; boundary="------------060005080008000704050707" 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/174 X-Sequence-Number: 10558 This is a multi-part message in MIME format. --------------060005080008000704050707 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Server 7.3.4 for W2K and Linux too. Encoding SQL_ASCII in both cases. I understand the source of the problem , but the ASCII encoding are not 7 bits , it has 8 bits with international charsets in codepages, like values in examples. You are talking about US-ASCII charset , that is a Unicode subset of 7 bits. No matter that , and speaking in CHARS , if I'm putting a 30 chars length string at a field of 30 chars length , I think that the driver can/must assure, a 30 chars length string transfer. May be a "data truncation" warning can be acceptable, or a replacement byte/char, or cutting the eight bit , but it's no sufficient reason to abort the update. What 's your opinion ? Dario. Kris Jurka wrote: >On Thu, 15 Jul 2004, Dario V. Fassi wrote: > > > >>Kris Jurka wrote: >> >>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. >> >> > >I mean that java and the jdbc driver internally represent strings with >unicode. If any of the data has the high bit set (ASCII values > 127) >then the jdbc driver will send it as two bytes or more because it uses >UTF-8. Normally the server will convert it from UTF-8 to the database's >encoding, but if the database is SQL_ASCII it doesn't know how to convert >it and must keep it as two bytes. You have not told us what your >database's encoding is yet. > >Kris Jurka > > >---------------------------(end of broadcast)--------------------------- >TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) > > > > -- Dario V. Fassi SISTEMATICA ingenieria de software srl Ituzaingo 1628 (2000) Rosario, Santa Fe, Argentina. Tel / Fax: +54 (341) 485.1432 / 485.1353 --------------060005080008000704050707 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Server 7.3.4  for W2K and Linux too.
Encoding SQL_ASCII  in both cases.

I understand the source of the problem  , but the ASCII encoding  are not 7 bits , it has 8 bits with international charsets in codepages, like values in examples.
You are talking about US-ASCII charset , that is a Unicode subset of 7 bits.

No matter that , and speaking in CHARS , if  I'm putting a 30 chars length string at a field of 30 chars length ,
I think that the driver can/must assure, a 30 chars length string transfer.
May be a "data truncation" warning can be acceptable, or a replacement byte/char, or cutting the eight bit ,
but it's no sufficient reason to abort the update.

What 's your opinion ?

Dario.

Kris Jurka wrote:
On Thu, 15 Jul 2004, Dario V. Fassi wrote:

  
Kris Jurka wrote:

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.
    

I mean that java and the jdbc driver internally represent strings with
unicode.  If any of the data has the high bit set (ASCII values > 127)  
then the jdbc driver will send it as two bytes or more because it uses
UTF-8.  Normally the server will convert it from UTF-8 to the database's
encoding, but if the database is SQL_ASCII it doesn't know how to convert
it and must keep it as two bytes.  You have not told us what your 
database's encoding is yet.

Kris Jurka


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)


  

--

    Dario V. Fassi


SISTEMATICA ingenieria de software  srl
Ituzaingo 1628  (2000)  Rosario, Santa Fe, Argentina.
Tel / Fax:  +54 (341) 485.1432 / 485.1353



--------------060005080008000704050707--