Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes JDBC and Relational Databases and the fly likes UnsupportedCharset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "UnsupportedCharset" Watch "UnsupportedCharset" New topic


Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

I am using JDBC to connect to a sybase database. Supposedly the charset used is different on the server's side and this throws an exception. I searched this up and the solution suggested by some, was to include charset=iso_1 in the jdbc URL as a parameter=value pair. That does not seem to work for me. I am using jconn2.jar to load the com.sybase.jdbc2.jdbc.SybDriver driver. Most people seem to have this problem, but at the end of the exception message they get something like roman-8 or UTF8 etc etc. I dont know why I get UnsupportedCharset instead. Shown below is the entire trace.

java.sql.SQLException: JZ006: Caught IOException: JZ0I6: An error occured converting UNICODE to the charset used by the server. Error message: UnsupportedCharset
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(
at com.sybase.jdbc2.tds.Tds.handleIOE(
at com.sybase.jdbc2.tds.Tds.language(
at com.sybase.jdbc2.jdbc.SybStatement.sendQuery(
at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(
at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(
at com.main.Main.readFrom(
at com.main.Main.main(
Exception in thread "main"

However this exception is not thrown in some of the machines here. I am one of the unfortunate souls to get this. I made sure the library files in all the machines are the same. No use

Anyone have any suggestions ? Has anyone solved this ?
[ January 25, 2007: Message edited by: John Meyers ]

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Rajesh Agarwal
Ranch Hand

Joined: Aug 01, 2005
Posts: 79
The JRE for Solaris and Linux supports all encodings, but JRE for windows comes in 2 versions. US-ONLY and International. While the US-ONLY supports only fewer encodings the International supports all of them.

Would not be a bad idea to try to swith betwen the versions of the JRE.
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

Ahhh i never thought of that. I did read about the English and International versions. Will try to switch them and let you know. Thanks
I agree. Here's the link:
subject: UnsupportedCharset
jQuery in Action, 3rd edition