1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-30 21:42:05 +03:00

Attached are a patch to allow the charset encoding used by the JDBC

driver to be set, and a description of said patch.  Please refer to
the latter for more information.

William
--
William Webber                               william@peopleweb.net.au
This commit is contained in:
Bruce Momjian
2000-09-12 04:58:50 +00:00
parent 4f5cdadf03
commit 65edb54186
7 changed files with 328 additions and 12 deletions

View File

@ -163,7 +163,16 @@ public class ResultSet extends org.postgresql.ResultSet implements java.sql.Resu
wasNullFlag = (this_row[columnIndex - 1] == null);
if(wasNullFlag)
return null;
return new String(this_row[columnIndex - 1]);
String encoding = connection.getEncoding();
if (encoding == null)
return new String(this_row[columnIndex - 1]);
else {
try {
return new String(this_row[columnIndex - 1], encoding);
} catch (UnsupportedEncodingException unse) {
throw new PSQLException("postgresql.res.encoding", unse);
}
}
}
/**