Using Hibernate v3.2.2 with JSQLConnect(JDBC) v4.0 and java v1.6.0 with MSSQL v9.0.3042.
I have a mapped VARCHAR column in a MSSQL database, with data encoded in the MSSQL default code page of Cp1252. When running java on a windows server with jvm default code page of Cp1252, Hibernate converts this character data successully into a String object with all characters properly translated from Cp1252.
When I run java on a linux server (Linux Red Hat Enterprise v3.0), characters in the "extended ascii" range of 0x80-0x9F seem to get mis-translated when the query data is converted into a String object. Hibernate builds the String object from raw ResultSet returned by the JDBC layer. In particular, I am testing with an EM DASH character, which has Cp1252 code of 151(0x97) and Unicode code value of 8212(0x2014).
Default jvm code page on windows is Cp1252, while on linux it is not Cp1252, most likely iso-8859-1. Is there some way that I need to configure Hibernate to know that character data for this property, or for the whole database, is in Cp1252 instead of the default jvm code page on linux?
Thanks,
Greg Burcher
|