From: | Rene Pijlman <rene(at)lab(dot)applinet(dot)nl> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Cc: | quentin(dot)delance(at)insalien(dot)org |
Subject: | Re: RE : ? (question mark) characters |
Date: | 2001-09-01 20:42:27 |
Message-ID: | ush2pt04jd4f0ed83bnmiqm522pvkfmqe5@4ax.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I'm forwarding this workaround to the list. Can someone shed
some light on this?
Java uses Unicode and should be able to represent all ISO
Latin-1 (8859-1) encoded characters. Why would we need to tell
the driver what character set the backend is sending us? Can't
it ask the backend dynamically?
On Sat, 01 Sep 2001 22:34:49 +0200, Quentin Delance wrote:
>I ve just read that you were having questions about non ascii characters support
>when accessing a posgresql DB through JDBC.
>As I am french (éèà...), I got the same problem but here is the solution (found
>on an old mailling list).
>
>While connecting to the db, don't use the
>DriverManager.getConnection(url,login,passwd) API but instead
>DriverManager.getConnection(url,properties) and set your charSet in these
>properties.
>
>Example :
>
> Properties info = new Properties();
> info.put("user",login);
> info.put("password",passwd);
> info.put("charSet","ISO8859_1");
> dbCon = DriverManager.getConnection(dbURL,info);
>
>While calling getString on a ResultSet, you should not get '?' chars any more.
>
>Hope this helps,
>
>
> Quentin
Regards,
René Pijlman <rene(at)lab(dot)applinet(dot)nl>
From | Date | Subject | |
---|---|---|---|
Next Message | Rene Pijlman | 2001-09-01 21:02:47 | Re: Re: Escape Processing problems |
Previous Message | Rene Pijlman | 2001-09-01 20:38:01 | Re: Re: Proposal to fix Statement.executeBatch() |