db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-683) Use correct encoding for ClobOutputStream on client
Date Wed, 08 Feb 2006 22:51:01 GMT
    [ http://issues.apache.org/jira/browse/DERBY-683?page=comments#action_12365646 ] 

Myrna van Lunteren commented on DERBY-683:

The ibm15 skip was a non-issue. However, I've found that possibly the encoding setting may
not get reset with subsequent tests.

What I found is this:
when commenting out the 'runwithjdk14=false' property, and running derbyall(not when running
derbynetclientmats) with insane jars under DOS all subsequent derbynetclientmats tests fail
with error like this in the diff:
*** Start: CompatibilityTest jdk1.4.2_03 DerbyNetClient derbynetclientmats:derbynetclientmats
2006-02-07 11:48:42 ***
0 add
> þÿ j a v a . l a n g . N o C l a s s D e f F o u n d E r r o r :  org.apache.derbyTesting.functionTests.tests.junitTests.derbyNet.CompatibilityTesÿý

> Exception in thread "main" 
Test Failed.

So, there's something not entirely ok in this patch.

One solution would be to put the encodingTests as the last suite in derbynetclientmats.properties,
but that still leaves an unpleasant feeling.

I suggest we do not commit the test work at this time, and I will look into it in line with

> 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
>     Versions:,
>  Environment: all
>     Reporter: Sunitha Kambhampati
>     Assignee: Deepa Remesh
>      Fix For:
>  Attachments: ascii.txt, clob.java, derby-683.diff, derby-683_tests.diff, derby-683_tests.status
> 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