RE: bug in JDBC UNICODE support

From: Peter Mount <petermount(at)maidstone(dot)gov(dot)uk>
To: "'Eric D(dot) Friedman'" <eric(at)etranslate(dot)com>, pgsql-interfaces(at)postgresql(dot)org
Subject: RE: bug in JDBC UNICODE support
Date: 2000-09-14 08:50:48
Message-ID: 1B3D5E532D18D311861A00600865478CF1B3D6@exchange1.nt.maidstone.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I'm still wading through the patches, and as this was only posted 3 days
ago, it's low down on the list, and currently I'm having to fit in my
postgresql work as and when I can within quite a few other projects here at
work, so it's going to take a while (although I will be able to throw some
interesting stuff back to the project afterwards like interfacing a
postgresql database to wap phones, etc).

When the dns get's sorted, you'll be able to have a play with what has been
taking me away from JDBC development at http://www.digitalmaidstone.org

Peter

--
Peter Mount
Enterprise Support Officer, Maidstone Borough Council
Email: petermount(at)maidstone(dot)gov(dot)uk
WWW: http://www.maidstone.gov.uk
All views expressed within this email are not the views of Maidstone Borough
Council

-----Original Message-----
From: Eric D. Friedman [mailto:eric(at)etranslate(dot)com]
Sent: Thursday, September 14, 2000 4:39 AM
To: pgsql-interfaces(at)postgresql(dot)org
Subject: [INTERFACES] bug in JDBC UNICODE support

I built a postgresql.jar file from the HEAD of CVS on 9/13/2000.
According to the CVS logs, this includes code to support correct
handling of UNICODE (UTF-8) characters in the JDBC driver, provided
that the database is, in fact, a unicode database.

The driver simply does not work as advertised. I ran the
example.Unicode test and it confirmed the problem I encountered in my
own code by reporting that each of the strings inserted was different
from those returned by a subsequent select.

Browsing in the pgsql-interfaces archives, I found that a
user-contributed patch that DOES work and which has a bit more
intelligence about setting reasonable defaults for the encoding (it
asks the backend which encoding to use).

That patch is available at

http://www.se.postgresql.org/mhonarc/pgsql-interfaces/2000-09/msg00038.html

I believe that this patch - which is a superior implementation, I might
add - should replace the current, broken encoding handler.

Eric

P.S. I tried to submit this as a bug using the web interface for bug
reports, but that reported the following error:

Warning: Unable to connect to PostgreSQL server: No pg_hba.conf entry for
host localhost, user vev, database postgresql in
/home/projects/pgsql/ftp/www/html/bugs/bugs.php on line 150
Unable to access database

It is unclear to me how to report a bug on the bug system. ;-)

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Mount 2000-09-14 12:36:05 RE: jdbc Bug ?
Previous Message Carl Shelbourne 2000-09-14 08:49:34 UnixODBC/Postgres & Excel...