pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexandre Aufrere <alexandre.aufrere@inet6.fr>
To: pgsql-jdbc@postgresql.org
Subject: Problems with charsets, investigated...
Date: Fri, 06 Aug 2004 16:43:35 +0200
Message-ID: <20040806144335.933C4400E5@smtp.ies.inet6.fr> (raw)

Hello,

I am using Postgresql 7.4.2 and its JDBC drivers, straight out from a FC2, 
along with JDK 1.4.2 from Sun. 
I use the JDBC driver in a web app using Enhydra appserver. Java correctly 
sets its file.encoding property to the charset specified in the LANG 
environment variable. However, it appears that whatever i set this 
variable to, the JDBC driver seems to use UTF-8. 

I have digged into the code, and seen that in the 
AbstractJdbc1Connection.java class, the encoding is always forced to 
"UNICODE" (therefore forcing UTF-8 on Java side). 
From that, i patched the code to correctly use the file.encoding system 
property to guess the charset. 

As i didn't dig very long, and as it seems from what i see in cvsweb at 
gborg that all this stuff could have changed deeply, i am not sure that 
this would be useful to you. However i downloaded the latest dev builds at 
jdbc.postgresql.org, and it seems the bad behaviour is still there. 

So, did i miss something somewhere ? Are you interested in that (frankly 
quite ugly) patch ? 

Regards,

Alexandre Aufrere




view thread (12+ messages)  latest in thread

Message-ID: <20040806144335.933C4400E5@smtp.ies.inet6.fr>
Permalink:  ../20040806144335.933C4400E5@smtp.ies.inet6.fr/
Also on:    postgresql.org/message-id/20040806144335.933C4400E5@smtp.ies.inet6.fr

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: alexandre.aufrere@inet6.fr
  Subject: Re: Problems with charsets, investigated...
  In-Reply-To: <20040806144335.933C4400E5@smtp.ies.inet6.fr>
  References: <20040806144335.933C4400E5@smtp.ies.inet6.fr>

* 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