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 1C3603A4646 for ; Wed, 27 Oct 2004 14:11:51 +0100 (BST) 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 38533-02 for ; Wed, 27 Oct 2004 13:11:42 +0000 (GMT) Received: from mail46.e.nsc.no (mail46.e.nsc.no [193.213.115.46]) by svr1.postgresql.org (Postfix) with ESMTP id 896E33A4641 for ; Wed, 27 Oct 2004 14:11:44 +0100 (BST) Received: from seymour.intern.yoyo.no (ti122110a080-8977.bb.online.no [83.109.35.17]) by mail46.nsc.no (8.12.11/8.12.11) with ESMTP id i9RDBe0N001533 for ; Wed, 27 Oct 2004 15:11:41 +0200 (CEST) Received: from anders by seymour.intern.yoyo.no with local (Exim 3.36 #1 (Debian)) id 1CMnaW-00026b-00 for ; Wed, 27 Oct 2004 15:11:40 +0200 Date: Wed, 27 Oct 2004 15:11:40 +0200 From: Anders Hermansen To: pgsql-jdbc@postgresql.org Subject: Re: using 8 bit ascii Message-ID: <20041027131140.GB7634@online.no> Mail-Followup-To: pgsql-jdbc@postgresql.org References: <04875CB4331F0240A0AD66F9709786510272AC98@paul> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <04875CB4331F0240A0AD66F9709786510272AC98@paul> X-Editor: Vim http://www.vim.org/ X-Operating-System: Linux/2.6.9-rc2-mm2 (i686) User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/276 X-Sequence-Number: 11381 Hello Jason, ASCII is only 7-bit. Values 0 to 127. ISO-8859-1 is an example of a character set with 8-bits (0 to 255). 233 is =E9 in ISO-8859-1 (Latin-1). You should create the database with an encoding which can handle 8-bit characters. I.e. ISO-8859-1 (Postgresql: Latin-1) or UTF-8 (Postgresql: UNICODE) Anders * Jason Tesser (JTesser@nbbc.edu) wrote: > I have a Postgres database (version 7.4.2) that is using acsii character > 233 which is an 8 > bit ascii character. I also use jboss. My problem is when I try to > retrieve=20 > a resultset that has a record with one of the 8bit ascii characters I > get a=20 > message from jboss (see error message below.=20=20 >=20 > My question is there a way to configure the postgres jdbc driver to > allow=20 > for this range of characters?=20=20 >=20 > 2004-10-26 16:54:51,167 ERROR [STDERR] > org.postgresql.util.PSQLException: Invalid character data was found. > This is most likely caused by stored data containing characters that are > invalid for the character set the database was created in. The most > common example of this is storing 8bit data in a SQL_ASCII database. > 2004-10-26 16:54:51,167 ERROR [STDERR] at > org.postgresql.core.Encoding.decodeUTF8(Encoding.java:287) > 2004-10-26 16:54:51,167 ERROR [STDERR] at > org.postgresql.core.Encoding.decode(Encoding.java:182) > 2004-10-26 16:54:51,167 ERROR [STDERR] at > org.postgresql.core.Encoding.decode(Encoding.java:198) > 2004-10-26 16:54:51,167 ERROR [STDERR] at > org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1Resul > tSet.java:201) > 2004-10-26 16:54:51,167 ERROR [STDERR] at > org.postgresql.jdbc1.AbstractJdbc1ResultSet.getString(AbstractJdbc1Resul > tSet.java:475) > 2004-10-26 16:54:51,168 ERROR [STDERR] at > payroll.DeptWorkers.loadWorkers(DeptWorkers.java:52) > 2004-10-26 16:54:51,168 ERROR [STDERR] at > org.apache.jsp.manager_jsp._jspService(manager_jsp.jav >=20