Re: Does the oci 8 driver support internationalization

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 25 Sep 2002 00:04:30 -0700
Message-ID: <92eeeff0.0209242304.77c77017_at_posting.google.com>


sufie_at_sufie.com (Sufie Seifoddini) wrote in message news:<79cb9f13.0209241352.39639248_at_posting.google.com>...
> Hello all,
>
> I have an application running on oracle 8.1.6. The database is
> installed on Solaris 8 machine. The web application runs on tomcat
> 3.2.3/solaris 8.
>
> When we configure the application to use the thin driver, Japanese
> characters entered from an ie browser are viewed correctly in the
> browser when they are retrieved from the database.
>
> When we change to an oci8, however, we see garbage.
>
> Are there any additional parameters that need to be set in order to
> get the translation to work properly using oci8.
>
> Thanks in advance,
>
> Sufie

Unlike OCI8 driver, JDBC thin driver does not rely on client's NLS_LANG setting. No matter what the database characterset is, JDBC always presents it as Java unicode UCS2 on the client. Depending on database characterset and client's NLS_LANG setting, JDBC may convert data to UTF8 before converting it to UCS2. Assuming your database chacacterset is set to non-ASCII then,

Oci8 driver does all characterset conversion on the client side based on client's NLS_LANG setting. Set client NLS_LANG to database characterset so that oci8 driver can correctly convert it first to UTF8 and then to Java's unicode UCS2. I think right now it's not first converting it to UTF8.

JDBC thin driver, on the other hand, does all conversion to UTF8 on the server side. It then converts UTF8 to UCS2 on the client side thus bypassing client's NLS_LANG setting.

/Rauf Sarwar Received on Wed Sep 25 2002 - 09:04:30 CEST

Original text of this message