By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,276 Members | 2,137 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,276 IT Pros & Developers. It's quick & easy.

java.io.CharConversionException: java.io.UnsupportedEncodingException: hp-roman8

dmjpro
100+
P: 2,476
The total Exception is ......
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: hp-roman8
But now how should I handle this exception.
I am trying to do a Desktop Application ..Database Server has different Character Set .... and Client has an another one.
So how could I check that whether this Character Set is available in client Machine or not?

Please Help me.

Debasis Jana
Apr 1 '08 #1
Share this Question
Share on Google+
18 Replies


Expert 10K+
P: 11,448
The total Exception is ......
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: hp-roman8
But now how should I handle this exception.
I am trying to do a Desktop Application ..Database Server has different Character Set .... and Client has an another one.
So how could I check that whether this Character Set is available in client Machine or not?

Please Help me.

Debasis Jana
First you should always check if an en/decoding is supported; read the API
documentation for Charset.getAvailableCharsets()

kind regards,

Jos
Apr 1 '08 #2

dmjpro
100+
P: 2,476
First you should always check if an en/decoding is supported; read the API
documentation for Charset.getAvailableCharsets()

kind regards,

Jos

Thanks for Reply.
Now after checking that ..if that Character Set is not available then what shoud I be doing???
Please Help!

Debasis Jana.
Apr 1 '08 #3

Expert 10K+
P: 11,448
Thanks for Reply.
Now after checking that ..if that Character Set is not available then what shoud I be doing???
Please Help!

Debasis Jana.
Write your own or buy/download one; also see the CharsetProvider class.
You could've read the API documentation first though ...

kind regards,

Jos
Apr 1 '08 #4

dmjpro
100+
P: 2,476
Write your own or buy/download one; also see the CharsetProvider class.
You could've read the API documentation first though ...

kind regards,

Jos

One more thing I got a solution there ............. Sloution
CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.Tru ncationConverter
I am using the http://www.docjar.com/jars/jconn2-2001-06-19.jar while I connecting to the database then.
And com.sybase.jdbc2.utils.TruncationConverter class is available in that jar.
So should I be setting this ....
CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.Tru ncationConverter
???

Please Help.

Debasis Jana.
Apr 1 '08 #5

Expert 10K+
P: 11,448
One more thing I got a solution there ............. Sloution
CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.Tru ncationConverter
I am using the http://www.docjar.com/jars/jconn2-2001-06-19.jar while I connecting to the database then.
And com.sybase.jdbc2.utils.TruncationConverter class is available in that jar.
So should I be setting this ....
CHARSET_CONVERTER_CLASS=com.sybase.jdbc2.utils.Tru ncationConverter
???

Please Help.

Debasis Jana.
According to that package name that functionality is available in the Sybase
database management system. Are you using that database?

kind regards,

Jos
Apr 1 '08 #6

dmjpro
100+
P: 2,476
According to that package name that functionality is available in the Sybase
database management system. Are you using that database?

kind regards,

Jos
Yeah I am using that database.
When I consulted with my Sir then he told me that hp-roman8 is not standard.
It is so ancient.
Now I think if i can set that property with that converter class then should I be able to solve that problem.
Now I am getting a connection object ... so from that object how could I set that property.

Please Help.

Debasis Jana.
Apr 1 '08 #7

Expert 10K+
P: 11,448
Yeah I am using that database.
When I consulted with my Sir then he told me that hp-roman8 is not standard.
It is so ancient.
Now I think if i can set that property with that converter class then should I be able to solve that problem.
Now I am getting a connection object ... so from that object how could I set that property.

Please Help.

Debasis Jana.
RTFM

kind regards,

Jos
Apr 1 '08 #8

dmjpro
100+
P: 2,476
RTFM

kind regards,

Jos
RTFM what is that??? :-)

Debasis Jana
Apr 1 '08 #9

10K+
P: 13,264
RTFM what is that??? :-)

Debasis Jana
Google is your friend
Apr 1 '08 #10

dmjpro
100+
P: 2,476
Google is your friend

I tried in Google.
But how could I get the ConnectionProperties from the Connection Object?
What I think guys ... If I do this then would it be working?

Expand|Select|Wrap|Line Numbers
  1. Properties con_props = new Properties();
  2. con_props.setProperty("username",value1);
  3. con_props.setProperty("password",value2);
  4. con_props.setProperty("CHARSET_CONVERTER_CLASS",value3);
  5. DriverManager.getConnection(url,con_props);
  6.  
Debasis Jana.
Apr 1 '08 #11

10K+
P: 13,264
I tried in Google.
But how could I get the ConnectionProperties from the Connection Object?

Debasis Jana.
Google for the letters that Jos posted above.
Apr 1 '08 #12

Expert 10K+
P: 11,448
I tried in Google.
But how could I get the ConnectionProperties from the Connection Object?
What I think guys ... If I do this then would it be working?

Expand|Select|Wrap|Line Numbers
  1. Properties con_props = new Properties();
  2. con_props.setProperty("username",value1);
  3. con_props.setProperty("password",value2);
  4. con_props.setProperty("CHARSET_CONVERTER_CLASS",value3);
  5. DriverManager.getConnection(url,con_props);
  6.  
Debasis Jana.
RTFM == Read The Fine Manual; please do so and stop guessing and stop
asking questions for which you could easily have found the solution in one of
those fine manuals.

kind regards,

Jos
Apr 1 '08 #13

dmjpro
100+
P: 2,476
Google for the letters that Jos posted above.
lolz ...
So I can't solve that problem ? :-(

Debasis Jana
Apr 1 '08 #14

Expert 10K+
P: 11,448
lolz ...
So I can't solve that problem ? :-(

Debasis Jana
Just for the record: I googled for 'rtfm' and this is the first link it came up with.

Please try to find solutions to your questions first using the easy way out.

kind regards,

Jos

ps. Did your option pane up 'come up' properly already? How's your Swing going?
Apr 1 '08 #15

dmjpro
100+
P: 2,476
Just for the record: I googled for 'rtfm' and this is the first link it came up with.

Please try to find solutions to your questions first using the easy way out.

kind regards,

Jos

ps. Did your option pane up 'come up' properly already? How's your Swing going?
No it's not coming.

Debasis Jana
Apr 1 '08 #16

Expert 10K+
P: 11,448
No it's not coming.

Debasis Jana
So what do you do about it? Simply leave it and go on to a next question?

kind regards,

Jos
Apr 1 '08 #17

dmjpro
100+
P: 2,476
Josh rigth now I discovered that.
The problem is not with that property....
Actually what happened when i tried to connect the database using NetBeans IDE 5.5 then same error reported by NetBeans?

Now Josh..is it the problem with that driver or error with that property?


Debasis Jana.
Apr 1 '08 #18

dmjpro
100+
P: 2,476
I managed to do that.
Actually some pressure was on my head.
That's y i started fake questioning .....
Just simply set the ....
Expand|Select|Wrap|Line Numbers
  1. conn_props.setProperty("CHARSET_CONVERTER_CLASS","com.sybase.jdbc2.utils.TruncationConverter");
  2.  
Debasis Jana
Apr 1 '08 #19

Post your reply

Sign in to post your reply or Sign up for a free account.