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 91535536C2 for ; Tue, 26 Apr 2005 13:17:12 -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 42220-07 for ; Tue, 26 Apr 2005 16:17:04 +0000 (GMT) Received: from avas02bg.etb.net.co (avas02bg.etb.net.co [63.171.232.131]) by svr1.postgresql.org (Postfix) with ESMTP id 8B3A1536BB for ; Tue, 26 Apr 2005 13:17:01 -0300 (ADT) Received: from avas02bg.etb.net.co (avas02bg [127.0.0.1]) by localhost.etb.net.co (Postfix) with ESMTP id 461851BC307 for ; Tue, 26 Apr 2005 11:17:19 -0500 (COT) Received: from smtp01bg.007mundo.com (unknown [192.168.168.231])by avas02bg.etb.net.co (Postfix) with ESMTP id 396821BC1D7for ; Tue, 26 Apr 2005 11:16:59 -0500 (COT) Received: from [192.168.0.8] ([65.167.84.174]) by smtp01bg.007mundo.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 26 Apr 2005 11:16:47 -0500 Message-ID: <426E685F.1020600@ingenian.com> Date: Tue, 26 Apr 2005 11:12:15 -0500 From: =?ISO-8859-1?Q?Mauricio_Hern=E1ndez_Dur=E1n?= Reply-To: mhernandez@ingenian.com User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: ERROR: could not convert UTF-8 character 0x00ef to ISO8859-1 possiblesolution X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/mixed; boundary=------------090100010602000303040106 X-OriginalArrivalTime: 26 Apr 2005 16:16:47.0551 (UTC) FILETIME=[587654F0:01C54A7B] X-imss-version: 2.025 X-imss-result: Passed X-imss-approveListMatch: mhernandez@ingenian.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200504/166 X-Sequence-Number: 12773 This is a multi-part message in MIME format. --------------090100010602000303040106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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!! --------------090100010602000303040106 Content-Type: text/x-vcard; charset=utf-8; name="mhernandez.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mhernandez.vcf" 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 --------------090100010602000303040106--