----- Original Message ----- 
From: "Avi Cherry" <[EMAIL PROTECTED]>
Sent: Tuesday, September 26, 2000 7:47 PM


> I'm glad I picked this up when I did.  Much of the work I do is in 
> non-ASCII/Roman character encodings and I noticed in Value.java that 
> when long character values (over 2000 characters) are being updated, 
> they are added to the prepared statement as setAsciiStream().  This 
> effectively destroys any characters other than ASCII characters.  I 
> think a better approach would be to use setCharacterStream() which 
> takes a Reader instead of an InputStream as its data argument.  In 
> fact, programmatically, this is easier, since you don't have to 
> convert the string into bytes and then construct a 
> ByteArrayInputStream around it.  You can just construct a 
> StringReader around the original string.  According the docs, it's up 
> to the database driver to convert the characters into 'database char 
> format'.
> So, if everyone agrees to this, I'll commit the changes.

+1.  Nice catch.

Serge Knystautas
Loki Technologies
http://www.lokitech.com/



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to