Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

UnsupportedCharset

 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: java.io.IOException: JZ0I6: An error occured converting UNICODE to the charset used by the server. Error message: java.io.CharConversionException: java.io.UnsupportedEncodingException: UnsupportedCharset
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:485)
at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:3064)
at com.sybase.jdbc2.tds.Tds.language(Tds.java:702)
at com.sybase.jdbc2.jdbc.SybStatement.sendQuery(SybStatement.java:1425)
at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1495)
at com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:402)
at com.main.Main.readFrom(Main.java:26)
at com.main.Main.main(Main.java:18)
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 ]
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
    Bookmark Topic Watch Topic
  • New Topic