Hi,
I have a query regarding the Character Set class in ojdbc.jar. I am using ojdbc5.jar. My application uses
JAVA and Oracle 10 DB running OC4J.
I have a
String(java.lang) which I'm converting it to a oracle sql type 'Char' using the CharacterSet. The value that I use for Character Set is DEFAULT_CHARSET.
CharacterSet charset = CharacterSet.make(CharacterSet.DEFAULT_CHARSET);
if (o instanceof String) {
return new CHAR((String) o, charset);
}
When I debugged the code, I see the value of charset as 31 which corresponds to ISO_LATIN and 8859P1.
I have Russian Characters in my String because of ISO_LATIN and 8859P1, Russian characters are not recognized and they return Junk values. I wanted DEFAULT_CHARSET to return 871 which corresponds to UTF-8 so that it recognizes Russian characters. I don't want to hard code UTF-8 in the code rather do changes such that default charset points to UTF-8.
How do I do that? Why is DEFAULT_CHARSET returning 31? My DB also has its default charset as UTF-8.
Please help. This is quite urgent to me. Your thoughts are very much appreciated.
Thanks in advance,
Karthika