Hi Ravi,
Great!!!
From: Ravi Varanasi <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: UTF-8 problem with Xerces-J2 Date: Fri, 5 Sep 2003 18:10:10 -0700
Finally, I could fix it. Following are the steps, I think, to note when handling UTF-8 :
My environment: Solaris, WebLogic 7.1, Xerces-J2, Oracle OCI driver (for 9i)
1) Make sure InputSource is passed as param for parse method of Xerces parser.
2) In case of Oracle database, if the column type is : LONG (i.e. Java LONGVARCHAR), I have set data to the Prepared Statement as:
orastmt.defineColumnType(9, java.sql.Types.VARCHAR); orastmt.setObject(9, new String(shortDesc.getBytes("UTF-8"), "UTF-8") ); // Where shortDesc is a string holding my utf-8 data
If it is a short string, setString can be used.
3) I am using WebLogic application server. While reading the data off the DB, the NLS_LANG param must be set in the startup script as
NLS_LANG=AMERICAN_AMERICA.UTF8; export NLS_LANG
Hope this info will be helpful for others working on similar config.
Appreciate all the help from the user groups :-)
Thanks,
Ravi Varanasi 408 517 7675
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
_________________________________________________________________
Send and receive larger attachments with Hotmail Extra Storage. http://join.msn.com/?PAGE=features/es
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]