From: | Peter T Mount <peter(at)retep(dot)org(dot)uk> |
---|---|
To: | Martin Kuba <makub(at)inet(dot)cz> |
Cc: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: [INTERFACES] JDBC driver should use database encoding |
Date: | 1999-05-17 17:53:16 |
Message-ID: | Pine.LNX.4.04.9905171852050.3493-100000@maidast.retep.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
On Fri, 14 May 1999, Martin Kuba wrote:
> Hi,
>
> Postgres 6.4.2 has multibyte support, so database can be
> in one of several encodings. But the JDBC driver uses
> for fetching data this method:
>
> src/interfaces/jdbc/postgresql/ResultSet.java line 164:
> return new String(this_row[columnIndex - 1]);
>
> It means that not the database internal encoding, but
> the default encoding of client JVM will be used for
> converting 8-bit characters to 16-bit UNICODE characters.
>
> In postgres 6.5beta is the same code, so I think next
> release will have the same bug.
>
> Is it difficult to get the database encoding and use
> it for converting bytes to Strings ? Is anybody planning
> to do it ? If not, how can I do it ?
I haven't had chance to look at Unicode support yet, but if you can think
of a way of implementing it without breaking 8bit support, I'd be
interested.
Peter
--
Peter T Mount peter(at)retep(dot)org(dot)uk
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
Java PDF Generator: http://www.retep.org.uk/pdf
From | Date | Subject | |
---|---|---|---|
Next Message | Jason Earl | 1999-05-17 18:06:08 | Re: [INTERFACES] Vacuum takes for ever |
Previous Message | Bruce Momjian | 1999-05-17 16:34:32 | Re: [HACKERS] 6.5 cvs: problem with includes in src/interfaces/l |