db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunitha Kambhampati (JIRA)" <derby-...@db.apache.org>
Subject [jira] Created: (DERBY-683) Use correct encoding for ClobOutputStream on client
Date Sat, 05 Nov 2005 01:56:19 GMT
Use correct encoding for ClobOutputStream on client 

         Key: DERBY-683
         URL: http://issues.apache.org/jira/browse/DERBY-683
     Project: Derby
        Type: Bug
  Components: Network Client  
 Environment: all
    Reporter: Sunitha Kambhampati
     Fix For:

In client, there is code in ClobOutputStream which uses this api - new String(byte[]).   Per
the java api http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html#String(byte[])
,this will construct a string by decoding the array of bytes using the platform's default
character set. 

org.apache.derby.client.am.ClobOutputStream is used for Clob.setAsciiStream and the write
methods  use the String(byte[]) which is incorrect because it will use the default platform
encoding. Per the jdbcapi , this should use ascii encoding. 

In areas related to Clobs, also check for other places where  String(byte[]) is used,as it
may not be the desired behavior. 

Dan pointed this problem here : http://issues.apache.org/jira/browse/DERBY-463?page=comments#action_12356742

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message