From: | Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp> |
---|---|
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-16 01:48:26 |
Message-ID: | 199905160148.KAA00897@ext16.sra.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
> 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 ?
Here in Japan we already have such a patch (for 6.4.2). I belive it
can be used for any language, but I will ask the author of the patch
to make sure that.
---
Tatsuo Ishii
From | Date | Subject | |
---|---|---|---|
Next Message | Ole Gjerde | 1999-05-16 05:50:45 | Re: [INTERFACES] Re: [sql] mysql vs. postgresql |
Previous Message | Benoit Foucher | 1999-05-15 18:44:50 | Re: [INTERFACES] Problem loading jdbc driver in servlet, but not in program |