Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How can I convert Characterset Properly on JDBC?

How can I convert Characterset Properly on JDBC?

From: J.P.K <stmkjp_at_hotmail.com>
Date: 18 Apr 2002 00:18:39 -0700
Message-ID: <d6f86d9c.0204172318.3e0f7a8b@posting.google.com>


Hi,All.

Current Situation:
  DBMS : Oracle8i Using NLS_CHARACTERSET=AMERICAN_AMERICA.WE8DEC

  I'm Korean and uses KO16KSC5601 characterset, but   in Pro*C or in SQL*Plus it's ok to use Korean characters   because I matched NLS_CHARACTERSET with server in environment file.

Problem :
  When using JDBC, Korean Chars broken while English chars OK   in ResultSetObject. ( str = rset.getString(1); returns broken characters)

What I tried :
  String newResult = new String(rset.getBytes("8859_1"),"KSC5601");
--> some of Korean chars converted well, but still some other's not.
  

Question :

  1. I think "8859_1" is not fully compatible with "WE8DEC". What characterset alias should I use for getBytes method? I tried "WE8DEC", but jvm gave me an UnsupportedEncodingException error.
  2. Is there any other way for obtaining proper results? ( except for change DBMS server's NLS_CHARACTERSET, it's rejected by Server Admin group...it's SAP ERP DB and they said they don't recommend changing Server env. for Reliability...:-( )

It's very Urgent Situation and I'll be very appreciate if U can help me. Sorry for my poor English grammer, and Thanks in Advance. Received on Thu Apr 18 2002 - 02:18:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US