From: Mauricio Hernández Durán <mhernandez@ingenian.com>
To: pgsql-jdbc@postgresql.org
Subject: ERROR: could not convert UTF-8 character 0x00ef to ISO8859-1 possiblesolution
Date: Tue, 26 Apr 2005 11:12:15 -0500
Message-ID: <426E685F.1020600@ingenian.com> (raw)
Hi all!
We encountered the same problem most people have had using latin1 or
unicode for spanish characters upon inserting or updates:
ERROR: could not convert UTF-8 character 0x00ef to ISO8859-1
We checked out the mailing lists and found solutions from people who had
the same problem, we would like to share ours which was basically
We tried the changes proposed by others which consist of:
1. Set the database encoding to UNICODE or LATIN1 ( check this with psql
-l to get a list of the databases and their respective encodings)
2. Set the client connection pool encoding in the connection url:
?charSet=LATIN1
3. Set the charset directive in your JSP's to ISO-8859-1 (LATIN1).
AND
4. Instead of changing the code to work with streams of bytes and their
encoding as suggested by other postings we changed the encoding system
property for the JVM using the -Dfile.encoding=ISO-8859-1 option.
Mind you: since we had no backwards compatibility problems with other
legacy apps running on the server this did the trick for us.
AS a side note: the app worked perfectly on our testing environment
(WIndows XP , Jboss 3.2.3, Postgres 7.4 but not on production (Solaris
8, JBoss 3.2.3, Postgres 7.4) the difference being the default
file.enconding system property.
Hope it helps, comments on this solution are welcome!!
Attachments:mhernandez.vcf (text/x-vcard, 404B) download
begin:vcard
fn;quoted-printable:Mauricio Hern=C3=A1ndez Dur=C3=A1n
n;quoted-printable:Hern=C3=A1ndez Dur=C3=A1n;Mauricio
org:Ingenian
adr;quoted-printable:;;Kra 13# 90-20 Of. 509;Bogot=C3=A1;;;Colombia
email;internet:mhernandez@ingenian.com
title:Developer
tel;work:+57 (1) 6349135
tel;fax:+57 (1) 6104198
tel;cell:+57 (3) 3108581177
x-mozilla-html:FALSE
url:http://www.ingenian.com
version:2.1
end:vcard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: mhernandez@ingenian.com
Subject: Re: ERROR: could not convert UTF-8 character 0x00ef to ISO8859-1 possiblesolution
In-Reply-To: <426E685F.1020600@ingenian.com>
References: <426E685F.1020600@ingenian.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox