Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> JDBC Character Set Problems

JDBC Character Set Problems

From: Richard Lister <pbsis_at_hotmail.com>
Date: 31 Aug 2001 05:55:07 -0700
Message-ID: <4e0a7502.0108310455.4abc5bf6@posting.google.com>


We are modifying a system built with the following technologies:

Weblogic 4.5
Oracle 8
Java + JDBC

The system is a web based application that stores large text announcements in oracle CLOB columns.
The announcement text is inserted into the CLOB column via JDBC through a weblogic connection pool to the Oracle server. Currently announcement text only contains ASCII characters (0-127).

We have a requirement to also store the Windows-1252 Euro, Bullet and Pound Sign characters in the database. These have character codes 128, 149 and 163 respectively.

Unfortunately our database has been configured with an ISO-8859-1 (Latin 1) character set. The Latin-1 character set does not have any characters in the range 128-160. Therefore when we submit a string containing the above characters to JDBC to be written to a CLOB column, something in the process decides to convert our Euro and Bullet characters to code 191 characters (an upside down question mark).

I have come to the conclusion it is probably the NLS (national language support) functionality that is doing this conversion.

We know that the database can physically store characters with codes of 128 and 149 as we can insert them using programs like SQL*Plus, TOAD and MS Access. These tools do not cause the characters to be converted to code 191.

It does not appear to be an option to change the character set of our database as this is a live system and would involve a great deal of work.

So my question is: Does anybody know how to get Java / JDBC / Oracle to accept characters that are not part of the Database's character set without converting them into upside down question marks (code 191).

We either need to disable the translation routine or trick it into taking the characters.

I've tried changing the weblogic.properties file to include a 'codeset' property in the connection string for cp1252 and cp932 - but this had no effect.

Thanks for any advise,

Richard Lister Received on Fri Aug 31 2001 - 07:55:07 CDT

Original text of this message

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