Re: RE : ? (question mark) characters - Mailing list pgsql-jdbc

From Rene Pijlman
Subject Re: RE : ? (question mark) characters
Date
Msg-id ush2pt04jd4f0ed83bnmiqm522pvkfmqe5@4ax.com
Whole thread Raw
List 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@lab.applinet.nl>

pgsql-jdbc by date:

Previous
From: Rene Pijlman
Date:
Subject: Re: Re: Proposal to fix Statement.executeBatch()
Next
From: Rene Pijlman
Date:
Subject: Re: Re: Escape Processing problems