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 -> Re: Oralce 8i Japanese OS UTF8

Re: Oralce 8i Japanese OS UTF8

From: Dirk Kiehne <dirk_at_liberate.com>
Date: Tue, 14 Aug 2001 21:16:35 GMT
Message-ID: <3B79A91A.BE6D4A0F@liberate.com>

Darren Davis wrote:
>
> We have Oracle 8i configured to store UTF8 characters encodings (the
> NLS_CHARACTERSET parameter in NLS_DATABASE_PARAMETERS is UTF8).
>
> The database stored data input through a web browser, passed to a java
> Servlet, and then inserted using the thin oracle jdbc drivers. The
> servletResponse ContentType includes a "charset=UTF-8" value. And
> characters are correctly passed through and retrieved to the database
> when the browser encoding is set to utf-8.
>
> I have an English Windows 2000 Professional workstation, configured
> for Native Japanese support (the locale and default language settins
> are all set for japanese). When I run Oracle tools such as sqlplus,
> Toad, etc, and select japanese columns input via the web, the
> characters shown are not correct. I assume this is because the
> operating system is expecting shift-JIS characters, and oracle is just
> returning raw UTF-8 data...
>
> If I manually insert or update columns using sqlplus and the Windows
> IME, the characters come back as entered, however, trying to pull up
> one of those records through the web-app causes oracle to throw an
> error (cannot convert utf-8 to ucs2 - or something like that). I
> would like to have consistent characters in the database from both
> web-based and manual inserts.
>
> So, my question boils down to the following: Is there a way to
> configure the NLS_LANG value in the registry of the Win2k Japanese
> computer so that it can map between the OS Shift-JIS and the database
> UTF-8? I've tried using parameters of JAPANESE_JAPAN.UTF8 and
> JAPANESE_JAPAN.JA16SJIS but neither one seems to help with this
> problem.
>
> Is there something else that I'm missing?

Hi Darren,

I'm not sure I can answer all your questions but hopefully I can give you something to work with.

I recently set up 4 machines in different Asian locales, one being Japanese. I first installed Solaris with the EUC locale and then Oracle with the two parameters that it expects:

  setenv NLS_LANG JAPANESE_JAPAN.JA16EUC   setenv ORA_NLS33 $ORACLE_HOME/ocommon/nls/admin/data

It needs both of these to get everything right, since the second one points to where the language set info is. Also, and very importantly, the settings on the client side need to match the settings on the DB side.

Since you mention Shift-JS, you should know that this is an option that you can set for the DB creation and the Oracle client side. Instead of trying to do mapping between the Windows IME and Oracle client to the Oracle DB, why don't you just set them to all be the same?

-Dirk Received on Tue Aug 14 2001 - 16:16:35 CDT

Original text of this message

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