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 -> Re: Oracle Clob and characters from 0x80-0xa0 (128-160)

Re: Oracle Clob and characters from 0x80-0xa0 (128-160)

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Fri, 11 Jul 2003 01:16:33 GMT
Message-ID: <RdoPa.5040$3v1.1070@news02.roc.ny>

"Ilia" <nospam_at_deathtospam.com> wrote in message news:U9kPa.28370$EQ5.22193_at_twister.nyroc.rr.com...
> I need to store all possible 256 characters in the DB using JDBC. All works
> well when I use VARCHAR2 (I needed to set -Dfile.encoding=ISO-8859-1
> parameter on the JVM). I can store values using resultSet.setString() and
> retrieve using resultSet.getString().
>
> The problem is that I need to store values longer than 4000 bytes. I
> converted the column type to Clob and things broke:
>
> I set the value using preparedStatement.setString() and it is stored
> correctly in the database (I verified it using Toad). But when I use this
> code to get the values, characters in the range 0x80-0xa0 come back as 253
> instead:
>
> Clob clob = resultSet.getClob(1);
> String val = clob.getSubString(1, len);
>
> I've tried all methods on Clob and CLOB but everything I tried screwes up
> these characters. Please help!!
>
> Thanks.
>
>

and what version of Oracle this is in? The characterset of the database (select * from NLS_DATABASE_PARAMETERS)? Throw in the OS info also... Thin driver or oci driver?

Anurag Received on Thu Jul 10 2003 - 20:16:33 CDT

Original text of this message

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