Need to store the Chinese character in the Java String variable from the ResultSet
posted 7 years ago
I am having Oracle database. Through the select query i am fetching some chinese character record from the database. The query is working fine in the Oracle side, I can able to see the chinese character. But from the resultset i can't able to set it to the javastring. The chinese character are replaced with some ? (Question mark) character.
In my java class
String strRetID = rs.getString(2);
after the line execution the strRetID holds some non chinese character like(?).
How to resolve the problem? Please do the needful.
Assuming your database is configured to support Unicode (from memory its not the default option for Oracle) and whatever you are using to view the data is using the right character encoding there should not be a problem.