Re: INSERTINg a Clob in a portable way
- From: Thomas Kellerer <FJIFALSDGVAF@xxxxxxxxxxxxx>
- Date: Wed, 15 Aug 2007 14:37:27 +0200
Frank Meyer wrote on 15.08.2007 14:04:
Thomas Kellerer wrote:Hi FrankFile f = new File("sourcfile.txt");
Reader r = new InputStreamReader(new FileInputStream(f), "UTF-8");
preparedStatement.setCharacterStream(1, r, f.length());
Hi Thomas,
have a look at http://java.sun.com/mailers/techtips/corejava/2007/tt0207.html#1
where this issue may be clarified.
thanks for the answer, but I don't understand the relation to my question.
If I understand the article correctly, it describes how I can remove (normalize) problematic characters from a String. But in my case I need to store the contents of a text file un-altered into a database CLOB field. But to do that I need to know the number of characters according to a given encoding in a file, without reading the file into memory.
I can't seem to get the relation to normalizing a text input here...
Thomas
.
- Follow-Ups:
- Re: INSERTINg a Clob in a portable way
- From: Philipp Taprogge
- Re: INSERTINg a Clob in a portable way
- References:
- INSERTINg a Clob in a portable way
- From: Thomas Kellerer
- Re: INSERTINg a Clob in a portable way
- From: Frank Meyer
- INSERTINg a Clob in a portable way
- Prev by Date: Re: INSERTINg a Clob in a portable way
- Next by Date: Re: INSERTINg a Clob in a portable way
- Previous by thread: Re: INSERTINg a Clob in a portable way
- Next by thread: Re: INSERTINg a Clob in a portable way
- Index(es):