This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to convert CLOB to UTF8 stream in java. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

How to convert CLOB to UTF8 stream in java.

Nagarajan Lakshamanan

Joined: Sep 19, 2010
Posts: 8
Hi all,

We have batch job which actually runs on daily basis and produces XML with the Java code.And the XML generated is used for various purposes.
Recently the job was not executed successfully because of some special characters in XML which falls out of ANSI encoding stantands.

So we are in a situation to convert the CLOB datatype (input to Java code) to UTF8 encoded XML.
We are not to able to achieve this .

Right now the cloB data is converted to ASCII stream,which doesn't create a well formed XML based on UTF8 encoding standards .See below the code

Any thoughts on how to convert this CLOB to UTF8?

Paul Clapham

Joined: Oct 14, 2005
Posts: 19692

Duplicate of this post: -- closing this one.
Don't get me started about those stupid light bulbs.
subject: How to convert CLOB to UTF8 stream in java.
It's not a secret anymore!