In looking at the 7.1beta1 code for JDBC, I noticed that support was
authorBruce Momjian <bruce@momjian.us>
Fri, 22 Dec 2000 03:08:52 +0000 (03:08 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 22 Dec 2000 03:08:52 +0000 (03:08 +0000)
commitea59624060d3852a7eee800f6710dbd52aef3561
tree3d57eea144de5b2816dae299e4853bfdac4e5c55
parent1803bf241c7f309f84c3f0bac59f79e7cd671ac2
In looking at the 7.1beta1 code for JDBC, I noticed that support was
added to support character set encodings.  However I noticed that the
encoding that is used isn't obtained from the DB.  Since Java uses
unicode UCS2 internally the character set encoding is used to translate
strings from/to the DB encoding.  So it seems logical that the code
would get the encoding from the DB instead of the current method of
requiring the user pass it as a parameter.

Attached is a patch that gets the DB encoding from the DB in the same
manner as is done in libpq/fe-connect.c.  The patch is created off of
the latest CVS sources (Connection.java version 1.10).

Barry Lind
src/interfaces/jdbc/org/postgresql/Connection.java