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 A6FBB3A4055 for ; Wed, 5 Jan 2005 03:00:22 +0000 (GMT) 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 23764-07 for ; Wed, 5 Jan 2005 03:00:07 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [203.79.85.162]) by svr1.postgresql.org (Postfix) with ESMTP id D650E3A40B2 for ; Wed, 5 Jan 2005 03:00:09 +0000 (GMT) Received: from flood.opencloud.co.nz ([192.168.0.31]) by yass.opencloud.co.nz with esmtp (Exim 3.35 #1 (Debian)) id 1Cm1KV-0001cq-00; Wed, 05 Jan 2005 15:55:23 +1300 Message-ID: <41DB5719.5080702@opencloud.com> Date: Wed, 05 Jan 2005 15:55:21 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040803) X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Gagnon Cc: pgsql-jdbc@postgresql.org Subject: Re: JDBC and Latin1 Database problem References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.003 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/10 X-Sequence-Number: 11890 David Gagnon wrote: > To inform the jdbc driver that it must converts caracters I put the > following URL in my server.xml (notice the encoding=latin1). Without > this variable caracter י takes 2 spaces in the latin db. So יייייי will > takes 12 spaces. This make my varchar(10) to small. > jdbc:postgresql://127.0.0.1:5432/webCatalog?encoding=latin1 The 'encoding' parameter is only used for connections to pre-7.3 servers; in other cases it is ignored. What is the database encoding? ("SHOW server_encoding") > Error executing: INSERT INTO AK (AKNUM,AKDESC_PRI, > AKDESC_SEC,AKFRAIS,AKTAUX,AKTYPE) VALUES > ('CHEQ','CH?QUE','CHEQUE',22,null,1) > org.postgresql.util.PSQLException: ERROR: could not convert UTF-8 > character 0x00ef to ISO8859-1 Are you constructing this entire query string yourself, or are you using a PreparedStatement with parameters? Can you show us some sample code that demonstrates the problem? -O