| From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
|---|---|
| To: | David Gagnon <dgagnon74(at)hotmail(dot)com> |
| Cc: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Re: JDBC and Latin1 Database problem |
| Date: | 2005-01-05 02:55:21 |
| Message-ID: | 41DB5719.5080702@opencloud.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Gagnon | 2005-01-05 03:27:48 | Re: JDBC and Latin1 Database problem |
| Previous Message | David Gagnon | 2005-01-05 02:38:13 | JDBC and Latin1 Database problem |