I want to retrieve data that is stored in Oracle Clob using java and exporting it to Microsoft Words. I got it to work but the problem is when I have carriage return <CR> in Clob MS Word couldn't recognized it as carriage return, so it's displaying the text continuously without a carriage return. Can some one show me how can I convert CR to something that MS Word can understand ?
I am using oracle.jdbc.OracleResultSet instead of java.sql.ResultSet
Thanks for your help
posted 10 years ago
If the text file in the CLOB was created on a unix system, this might explain the problem.
Unix and DOS store text files differently. DOS places both a line feed and a carriage return character at the end of each line, while Unix places only a line feed character.
You might search for line feed characters (ascii 10) and replace them with a line feed and a Carriage return (ascii 13).