JDBC and Latin1 Database problem

From: "David Gagnon" <dgagnon74(at)hotmail(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: JDBC and Latin1 Database problem
Date: 2005-01-05 02:38:13
Message-ID: BAY17-F4793E7DA8B91F1D406AE3A6920@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi all,

I'm using postgresql 7.4 and pg74.215.jdbc3.jar as jdbc driver. I got
this error deploying my application on Linux/Tomcat5 This error is not
throwned in my development environment Win2000/Tomcat4.1.

Any Idea?

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

Is that the way to do it .. because I search a lot an only found a mail
talking about this flag...

Thanks for your help!!

/David

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

ERROR [main] (Dao.java:267) 2005-01-04 20:40:10,044 : Error processing the
sql file: resources/auxilary/payment/insert_test.sql
org.postgresql.util.PSQLException: ERROR: could not convert UTF-8 character
0x00ef to ISO8859-1

at com.ibatis.db.util.ScriptRunner.runScript(ScriptRunner.java:211)
at com.davecorp.webos.dao.Dao.executeSqlFile(Dao.java:264)
at com.davecorp.webos.dao.Dao.notificationEvent(Dao.java:234)

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-01-05 02:55:21 Re: JDBC and Latin1 Database problem
Previous Message dinakar 2005-01-03 14:39:21 unsubscribe