469,362 Members | 2,450 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,362 developers. It's quick & easy.

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

dmjpro
2,476 2GB
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
18 7271
JosAH
11,448 Expert 8TB
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
2,476 2GB
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
JosAH
11,448 Expert 8TB
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
2,476 2GB
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
JosAH
11,448 Expert 8TB
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
2,476 2GB
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
JosAH
11,448 Expert 8TB
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
2,476 2GB
RTFM

kind regards,

Jos
RTFM what is that??? :-)

Debasis Jana
Apr 1 '08 #9
r035198x
13,262 8TB
RTFM what is that??? :-)

Debasis Jana
Google is your friend
Apr 1 '08 #10
dmjpro
2,476 2GB
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
r035198x
13,262 8TB
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
JosAH
11,448 Expert 8TB
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
2,476 2GB
Google for the letters that Jos posted above.
lolz ...
So I can't solve that problem ? :-(

Debasis Jana
Apr 1 '08 #14
JosAH
11,448 Expert 8TB
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
2,476 2GB
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
JosAH
11,448 Expert 8TB
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
2,476 2GB
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
2,476 2GB
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.

Similar topics

1 post views Thread by Thomas Rokamp | last post: by
reply views Thread by Rami | last post: by
reply views Thread by Joie | last post: by
47 posts views Thread by Theatre Mgmt | last post: by
2 posts views Thread by ramasubramanian.rahul | last post: by
148 posts views Thread by BillJosephson | last post: by
4 posts views Thread by keveaton | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.