From: Aleksey Demakov <avd@gcom.ru>
To: pgsql-interfaces@postgresql.org
Subject: JDBC and character encoding
Date: 09 Oct 1998 18:08:32 +0700
Message-ID: <87ww6aouvi.fsf@avd.garsib.ru> (raw)
There is a problem using JDBC on machine with a character encoding
different from one used by backend. For instance, Russian version
of MS Windows uses codepage 1251, while in Russian Unix world most
widely used encoding is koi8-r.
I don't know whether there's standard way of dealing with this. Maybe
because I'm novice with Java & JDBC.
But having Java i18n facilities this problem could be easely solved.
There should be a per-connection property which will contain beckend's
encoding. So connecting with, say, such url
"jdbc:postgresql://host/database?encoding=KOI8-R"
will set this property to "KOI8-R". Functions to convert bytes to
characters and vice versa all have versions that accept encoding
argument. They should be used to perform such conversion.
I currently only have the driver from 6.3.2 distribution. I could
make a patch for it if JDBC maintainers agree with this proposal.
Regards,
Aleksey
--
Aleksey Demakov
avd@gcom.ru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: avd@gcom.ru
Subject: Re: JDBC and character encoding
In-Reply-To: <87ww6aouvi.fsf@avd.garsib.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox