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: Character set conversions in JDBC

Re: Character set conversions in JDBC

From: Chris O <itoys1_at_optusnet.com.au>
Date: Wed, 19 Jan 2005 19:46:37 +1000
Message-ID: <41ee2c7c$0$3436$afc38c87@news.optusnet.com.au>


Anurag Varma wrote:

> "Chris O" <itoys1_at_optusnet.com.au> wrote in message news:41ecef9f$0$20754$afc38c87_at_news.optusnet.com.au...
> 

>>I have preference for having our Oracle 9iR2 database server setup with
>> Unicode database character set [ AL32UTF8 or UTF8 ]. Most of the
>>data will be served up via WWW forms [ ColdFusion MX 6 ]. The database
>>server will run on Sun / Solaris 9. The ColdFusion server is a Java
>>program [ J2EE ] and accesses Oracle via JDBC [ thin client I think ].
>>
>>As I understand it Java stores all strings interally as Unicode [ UCS2 I
>>think ].
>>
>>For example, if the database character set is Latin-1 then the JDBC thin
>>client might convert from Latin-1 -> UCS4 and then from UCS4 -> UCS2.
>>This would be in line with the regular way Oracle does its conversions.
>>Alternatively, the JDBC thin client might have specializations that
>>convert directly from some popular character sets into UCS2.
>>
>>Does anyone know?
> 
> 
> I remember investigating this once.
> Java drivers (both oci and thin) convert latin-1 or us7ascii to ucs2 directly.
> 
> However, any other charset need to be converted to utf8 first on the server which is then
> converted to ucs2 on the java side.
> 
> I'd be surprised if this is not documented in the java doco or the nls guide at tahiti.oracle.com
> 
> Anurag
> 
> 

Anurag, thanks for the info.

I could not find it in the Java doco though I did see a discussion about the class oracle.sql.CHAR which agrees with what you said....but I didn't understand the context as I'm not a Java programmer. Also, I don't have access to tahiti as I'm not a DBA these days. Received on Wed Jan 19 2005 - 03:46:37 CST

Original text of this message

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