| From: | Alexandre Aufrere <alexandre(dot)aufrere(at)inet6(dot)fr> |
|---|---|
| To: | pgsql-jdbc(at)postgresql(dot)org |
| Subject: | Problems with charsets, investigated... |
| Date: | 2004-08-06 14:43:35 |
| Message-ID: | 20040806144335.933C4400E5@smtp.ies.inet6.fr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kris Jurka | 2004-08-06 16:05:54 | Re: Problems with charsets, investigated... |
| Previous Message | Robert Bowen | 2004-08-06 12:05:16 | No suitable driver error trying to connect to postgresql from jdeveloper |