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: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Tue, 18 Jan 2005 17:55:10 +0100
Message-ID: <csjev8$j55$1@news2.zwoll1.ov.home.nl>


Chris O wrote:
> 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?

No, I don't. I know that I miss a crucial part in your essay: the Oracle client. The client has it's own settings, and may be responsible for yet another conversion, and thus another possibility to go wrong. Check those settings! One way to make sure conversions in character sets do not play havoc is to keep all settings the same (avoid conversions).

And remember, Java only supports a few character sets (as opposed to Oracle).

AL16UTF16 is closest to what your clients will probably use; guessing most clients will be running Windows. Using that for the database assures all characters from that platform can be stored.

-- 
Regards,
Frank van Bortel
Received on Tue Jan 18 2005 - 10:55:10 CST

Original text of this message

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