Issue while reading Chinese Character from Oracle DB
Hi all
I'm facing some issue while reading chinese character from Oracle DB.
We are able to store the string 中纪委正积极组建国家. But while reading it back one char is replaced by ?. 中纪委正积�?组建国家
In database I can find the proper unicoded values sored. Following are the statements used for read/wie to DB.
Write to DB:
preparedStmt.setString(1, new String(paramValue.getBytes("UTF-8")));
Read From DB
String paramValue=rs.getString("CHINESE_COL");
String utfValue = new String(paramValue.getBytes(),"UTF-8");
My test client is a swing based client with chinese font settings running on JRE 1.4.
Oracle DB settings are given below.
PARAMETER VALUE
-
NLS_LANGUAGEAMERICAN
NLS_TERRITORYAMERICA
NLS_CURRENCY$
NLS_ISO_CURRENCYAMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSETUTF8
NLS_CALENDARGREGORIAN
NLS_DATE_FORMATDD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORTBINARY
NLS_TIME_FORMATHH.MI.SSXFF AM
PARAMETER VALUE
-
NLS_TIMESTAMP_FORMATDD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMATDD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_COMPBINARY
NLS_LENGTH_SEMANTICSBYTE
NLS_NCHAR_CONV_EXCPFALSE
NLS_NCHAR_CHARACTERSET UTF8
NLS_RDBMS_VERSION 10.2.0.1.0
What has gone wrong?Can anybody help me on this?
Thanks
Jobinesh
null

