Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Updating CLOB column in a UTF8 database
<snipped>
Phil Haigh wrote:
> In Java (JDBC thin) I'm connecting to an Oracle 8.1.6 database created with
> the UTF8 character set. I create a record in a table with an empty CLOB and
> then re-read it FOR UPDATE with the intention of adding a text document to
> the CLOB. However, only the first character of the document gets there. If I
> run the code on an 8.1.6 database that does NOT have a UTF8 character set,
> this works. Same server, same Oracle home. Here's the test case I produced
> for Oracle Metalink. You'll need a table to try it out:
This is a known bug.
Upgrade to 8.1.7 and then apply the patch to 8.1.7.1.0.
Also make sure that you are working with UTF8 on the front-end side and not UTF16. CLOBS are not correctly translated going into the database unless they are passed as UTF8.
The workaround is to insert the CLOB value into a table and then SELECT it back out again.
Daniel A. Morgan Received on Thu May 24 2001 - 00:12:37 CDT