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 -> Solution : Accessing Oracle databases with non-English data from a W2K English machine

Solution : Accessing Oracle databases with non-English data from a W2K English machine

From: zrb <zrajbun_at_hotmail.com>
Date: 18 Sep 2002 03:59:51 -0700
Message-ID: <2312ee51.0209180259.2ec1521b@posting.google.com>


Hi,

  Sorry for cross posting. However I have been asking this question in all these groups without much responses. So thought this will be useful to many.

  Atlast we cracked the mystery of accessing non-English data stored in Oracle 8i databases using the .NET OleDB provider from a English W2K.

  We have Shift-JIS data in a Oracle 8i database. NLS_LANG = JAPANESE_JAPAN.JA16SJIS and Database character set also as JAPANESE_JAPAN.JA16SJIS. We have UNICODE applications (unmanagaed C++ and .NET C#) accessing this database from W2K English using the MS ODBC driver for Oracle and MS OleDB driver for Oracle. We were facing major problems getting this to work since the drivers dont support unicode. We were having to convert everything to MBCS and then use it.

  Later we found out that the following combination of settings provides a easy solution, without any major code changes.

  1. Create a system environment variable NLS_LANG and set it to JAPANESE_JAPAN.JA16SJIS.
  2. Change the NLS_LANG registry entry under HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE, HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0 and HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\ALL_HOMES\ID0 to JAPANESE_JAPAN.JA16SJIS. If these dont exist create them.
  3. Set the system default locale to Japanese in Control Panel -> Regional Options. Install the locale if necessary.

  And thats it. Now our ODBC applications and .NET applications using the managed OLEDB providers are able to store and retrieve japanese data without any problems or conversions.

  Hope this will be useful.

Regards

zrb Received on Wed Sep 18 2002 - 05:59:51 CDT

Original text of this message

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