You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Kathey Marsden (JIRA)" <de...@db.apache.org> on 2005/08/20 00:49:54 UTC

[jira] Created: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
-----------------------------------------------------------------------------------

         Key: DERBY-525
         URL: http://issues.apache.org/jira/browse/DERBY-525
     Project: Derby
        Type: Bug
  Components: Network Client  
    Versions: 10.1.1.0, 10.1.1.1, 10.2.0.0    
    Reporter: Kathey Marsden


When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
the column type is a character type or a CLOB, then any out of 
range character (to the ASCII set) needs to be replaced by 0x3f 
('?', question mark). ASCII is defined as 8 bit characters, 
thus Unicode Characters in the range 0x0000 to 0x00ff are 
mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
in the range 0x0100 to 0xffff are mapped to 0x3f

By code inspection:

client code in 
org.apache.derby.client.am.ResultSet

embedded in 
org.apache.derby.impl.jdbc.ReaderToAscii



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.

Dan wrote :
>> Adding information at
>> http://db.apache.org/derby/papers/JDBCImplementation.html#GetAsciiStream%28%29
>> would make paper gloomy .
> 
> The easy solution is for applications not to use the getAsciiStream
> method. Any application that wants to stream character values should be
> using getCharacterStream, UniCode based and can be converted to any
> encoding using the standard Java mechanisms. Internally Derby is all
> UniCode to match Java.
> 
> Not gloomy at all, just a method that's part of JDBC but not really that
> useful.

Well ... 
I see . I will try to add the information to the paper .

Best regards.

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 2005/09/21


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by Daniel John Debrunner <dj...@debrunners.com>.
TomohitoNakayama wrote:

> Hello.
> 
> 
> I found what Dan told at page C-184 in specification of JDBC 3.0 .
> 
> 
> As our discussion shows, difference between ASCII and ISO-8859-1  seems
> to be very confusing .
> 
> It is not surprising user of derby misunderstand ASCII and ISO-8859-1 ,
> and call "correctly" getAsciiStream as "getISO8859_1Stream()" .
> I think changing behavior of getAsciiStream() would cause confusion
> application programs relying on current behavior .
> So I think we should keep current behavior .
> 
> // In my personal feeling , I feel some kind of solidarity ....
> // Many engeneers in Japan , who MUST use character outside 0x0000 -
> 0x00ff ,  often be troubled with character encoding problem .
> // Even engeneers , who only use character inside 0x0000 - 0x00ff , can
> be troubled ...
> // I think Experienced Japanese engeneer would not surprise so much
> finding this kind of behavior .
> // It's just everyday experience to be troubled with character encoding
> problem  ;_; ( Japanese smiley of crying :) ) .
> 
> Well ...  difficulty in encoding characters is World Wide Problem ...
> 
> 
> It may be better to record about this information .
> 
> Adding information at
> http://db.apache.org/derby/papers/JDBCImplementation.html#GetAsciiStream%28%29
> would make paper gloomy .

The easy solution is for applications not to use the getAsciiStream
method. Any application that wants to stream character values should be
using getCharacterStream, UniCode based and can be converted to any
encoding using the standard Java mechanisms. Internally Derby is all
UniCode to match Java.

Not gloomy at all, just a method that's part of JDBC but not really that
useful.

Dan.


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.


I found what Dan told at page C-184 in specification of JDBC 3.0 .


As our discussion shows, difference between ASCII and ISO-8859-1  seems to be very confusing .

It is not surprising user of derby misunderstand ASCII and ISO-8859-1 , and call "correctly" getAsciiStream as 
"getISO8859_1Stream()" .
I think changing behavior of getAsciiStream() would cause confusion application programs relying on current behavior .
So I think we should keep current behavior .

// In my personal feeling , I feel some kind of solidarity ....
// Many engeneers in Japan , who MUST use character outside 0x0000 - 0x00ff ,  often be troubled with character encoding problem .
// Even engeneers , who only use character inside 0x0000 - 0x00ff , can be troubled ...
// I think Experienced Japanese engeneer would not surprise so much finding this kind of behavior .
// It's just everyday experience to be troubled with character encoding problem  ;_; ( Japanese smiley of crying :) ) .

Well ...  difficulty in encoding characters is World Wide Problem ...


It may be better to record about this information .

Adding information at http://db.apache.org/derby/papers/JDBCImplementation.html#GetAsciiStream%28%29 would make paper gloomy .
I think writing at somehwere in wiki is preferable .
I will record it with modification of this issue .

Best regards .


/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "Daniel John Debrunner" <dj...@debrunners.com>
To: "Derby Development" <de...@db.apache.org>
Sent: Friday, September 23, 2005 12:26 AM
Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


> Bernt M. Johnsen wrote:
>
>>>>>>>>>>>>>>Daniel John Debrunner (JIRA) wrote (2005-09-22 15:10:29):
>>>
>>>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330193 ]
>>>
>>>Daniel John Debrunner commented on DERBY-525:
>>>---------------------------------------------
>>>
>>>See this link for the justifications on why getAsciiStream() uses 8 bits and not 7.
>>>
>>>http://db.apache.org/derby/papers/JDBCImplementation.html#GetAsciiStream%28%29
>>>
>>>Basically, it's based upon definitions from the JDBC spec.
>>
>>
>> Ok. But if you map Unicode characters in the range 0x0000-0x00ff to
>> 1-byte values without some translation, you get ISO-8859-1 characters,
>> not ASCII characters (which only covers the values 0x00-0x7f). I guess
>> it's user-friendly, but then the userdoc should explicitely explain
>> what is done in a way that is understandable to people who happen know
>> what exactly what the different standards define (Europeans and Asians
>> tend to be somewhat better educated in this than people from the
>> US.... for obvious reasons).
>
> Hey, don't blame me, first I'm not from the US and secondly, this
> behaviour is defined by JDBC (and not clearly at that). :-)
>
> To quote JDBC 3.0:
>
> CHAR(code) Character with ASCII code value code, where code is between 0
> and 255
>
> So JDBC defines ASCII as codes 0-255, 8 bit, and since this is a JDBC
> function we need to follow the JDBC spec.
>
>
> Technically getAsciiStream() is *not* converting to ASCII characters,
> it's converting to encoded bytes that in turn can be converted to ASCII,
> or ISO-8859-1 using character encoding. Ideally I think Sun should have
> deprecated this method when getCharacterStream was added to JDBC, then
> the same (and clearer) functionality would have been provided using
> standard Java character encoding.
>
> Or maybe calling it getISO8859_1Stream() would have been a better name!
>
> Dan.
>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 2005/09/21
>
> 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.4/109 - Release Date: 2005/09/21


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by Daniel John Debrunner <dj...@debrunners.com>.
Bernt M. Johnsen wrote:

>>>>>>>>>>>>>Daniel John Debrunner (JIRA) wrote (2005-09-22 15:10:29):
>>
>>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330193 ] 
>>
>>Daniel John Debrunner commented on DERBY-525:
>>---------------------------------------------
>>
>>See this link for the justifications on why getAsciiStream() uses 8 bits and not 7.
>>
>>http://db.apache.org/derby/papers/JDBCImplementation.html#GetAsciiStream%28%29
>>
>>Basically, it's based upon definitions from the JDBC spec.
> 
> 
> Ok. But if you map Unicode characters in the range 0x0000-0x00ff to
> 1-byte values without some translation, you get ISO-8859-1 characters,
> not ASCII characters (which only covers the values 0x00-0x7f). I guess
> it's user-friendly, but then the userdoc should explicitely explain
> what is done in a way that is understandable to people who happen know
> what exactly what the different standards define (Europeans and Asians
> tend to be somewhat better educated in this than people from the
> US.... for obvious reasons).

Hey, don't blame me, first I'm not from the US and secondly, this
behaviour is defined by JDBC (and not clearly at that). :-)

To quote JDBC 3.0:

CHAR(code) Character with ASCII code value code, where code is between 0
and 255

So JDBC defines ASCII as codes 0-255, 8 bit, and since this is a JDBC
function we need to follow the JDBC spec.


Technically getAsciiStream() is *not* converting to ASCII characters,
it's converting to encoded bytes that in turn can be converted to ASCII,
or ISO-8859-1 using character encoding. Ideally I think Sun should have
deprecated this method when getCharacterStream was added to JDBC, then
the same (and clearer) functionality would have been provided using
standard Java character encoding.

Or maybe calling it getISO8859_1Stream() would have been a better name!

Dan.



Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Bernt M. Johnsen" <Be...@Sun.COM>.
>>>>>>>>>>>> Daniel John Debrunner (JIRA) wrote (2005-09-22 15:10:29):
>     [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330193 ] 
> 
> Daniel John Debrunner commented on DERBY-525:
> ---------------------------------------------
> 
> See this link for the justifications on why getAsciiStream() uses 8 bits and not 7.
> 
> http://db.apache.org/derby/papers/JDBCImplementation.html#GetAsciiStream%28%29
> 
> Basically, it's based upon definitions from the JDBC spec.

Ok. But if you map Unicode characters in the range 0x0000-0x00ff to
1-byte values without some translation, you get ISO-8859-1 characters,
not ASCII characters (which only covers the values 0x00-0x7f). I guess
it's user-friendly, but then the userdoc should explicitely explain
what is done in a way that is understandable to people who happen know
what exactly what the different standards define (Europeans and Asians
tend to be somewhat better educated in this than people from the
US.... for obvious reasons).

-- 
Bernt Marius Johnsen, Database Technology Group, 
Sun Microsystems, Trondheim, Norway

[jira] Resolved: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-525?page=all ]
     
Tomohito Nakayama resolved DERBY-525:
-------------------------------------

    Fix Version: 10.2.0.0
     Resolution: Fixed

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-525?page=all ]

Tomohito Nakayama reassigned DERBY-525:
---------------------------------------

    Assign To: Tomohito Nakayama

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama

>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.

I see. I will work for them .

Best regards.

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "Daniel John Debrunner" <dj...@debrunners.com>
To: "Derby Development" <de...@db.apache.org>
Sent: Friday, September 30, 2005 2:52 AM
Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


> Sunitha Kambhampati (JIRA) wrote:
>
>>     [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330828 ]
>>
>> Sunitha Kambhampati commented on DERBY-525:
>> -------------------------------------------
>>
>> It would be great if you could add a testcase for this.
>>
>> I looked at the patch briefly, and had one minor comment.  In convertToAsciiByteArray, it might be better performance wise, if we 
>> calculate the original.length only once and use it in the for loop.
>
>
> Also I would strongly encourage you to add comments to code you add to
> Derby. In the future someone may be confused by what exactly the
> function is doing and what this line is:
>
> result[i] = 0x003f;
>
> A one or two line javadoc comment in the method description would suffice.
>
> Thanks,
> Dan.
>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.8/114 - Release Date: 2005/09/28
>
> 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.8/114 - Release Date: 2005/09/28


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by Daniel John Debrunner <dj...@debrunners.com>.
Sunitha Kambhampati (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330828 ] 
> 
> Sunitha Kambhampati commented on DERBY-525:
> -------------------------------------------
> 
> It would be great if you could add a testcase for this.
> 
> I looked at the patch briefly, and had one minor comment.  In convertToAsciiByteArray, it might be better performance wise, if we calculate the original.length only once and use it in the for loop.


Also I would strongly encourage you to add comments to code you add to
Derby. In the future someone may be confused by what exactly the
function is doing and what this line is:

result[i] = 0x003f;

A one or two line javadoc comment in the method description would suffice.

Thanks,
Dan.



Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by Sunitha Kambhampati <ks...@gmail.com>.
TomohitoNakayama wrote:

> Hello.
>
> Well  ... I decide to use "length" instance variable of  byte[].
>
> Then, I don't need to add new local variable .
>
Great!  That solves both of our concerns, not adding a new local 
variable and not calling  the String.length() function mutiple times.

Thanks Tomohito for taking care of this.

Sunitha.

Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.

Well  ... 
I decide to use "length" instance variable of  byte[].

Then, I don't need to add new local variable .

Best regards.

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "Sunitha Kambhampati" <ks...@gmail.com>
To: "Derby Development" <de...@db.apache.org>
Sent: Friday, September 30, 2005 8:07 AM
Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


> TomohitoNakayama wrote:
> 
>> Hello.
>>
>> I have one question ...
>>
>>> I looked at the patch briefly, and had one minor comment.  In 
>>> convertToAsciiByteArray, it might be better performance wise, if we 
>>> calculate the original.length only once and use it in the for loop.
>>
>>
>> Can it be improvement of performance so much ?
>>
>> Length of String object cannot be changed and there would be very less 
>> performance improvement .
>> //Improvement would be just saving time of calling method .
>>
> I think it is cheaper to store the int value, rather than calling the 
> method N times.  I did a simple test just to get some numbers with using 
> the length() versus calculating once.  Note- this test doesnt make much 
> sense otherwise..
> 
> string length = 810023
> test  calls method  length() each time   = 140 ms
> test precomputes length and uses the stored length = 90ms.
> 
> ex.
>        for(int j= 0; j < len; j++)
>        {
>            if (sb1.charAt(j) == 'a')
>            {
>               c = sb1.charAt(j);
>            }
>        }
> 
> versus,  computing the length() each time.
> ---------------
> 
> Java^TM Performance Tuning and Java Optimization Tips : 
> ftp://ftp.glenmccl.com/pub/free/jperf.pdf  : check out section 4.5.where 
> the author mentions some timing details, although the example code is 
> not right. :(
> 
> Hope this helps,
> Sunitha.
> 
>> Rather, I feel question for adding (local) variable , because I don't 
>> want to increase number of variable even if it is local ....
>>
>> Best regards.
>>
>> /*
>>
>>         Tomohito Nakayama
>>         tomonaka@basil.ocn.ne.jp
>>         tomohito@rose.zero.ad.jp
>>         tmnk@apache.org
>>
>>         Naka
>>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>>
>> */
>> ----- Original Message ----- From: "Sunitha Kambhampati (JIRA)" 
>> <de...@db.apache.org>
>> To: <de...@db.apache.org>
>> Sent: Friday, September 30, 2005 2:13 AM
>> Subject: [jira] Commented: (DERBY-525) getAsciiStreamshould replace 
>> non-ASCII characters with 0x3f, '?' to match embedded
>>
>>
>>>    [ 
>>> http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330828 
>>> ]
>>>
>>> Sunitha Kambhampati commented on DERBY-525:
>>> -------------------------------------------
>>>
>>> It would be great if you could add a testcase for this.
>>>
>>> I looked at the patch briefly, and had one minor comment.  In 
>>> convertToAsciiByteArray, it might be better performance wise, if we 
>>> calculate the original.length only once and use it in the for loop.
>>>
>>>
> 
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/115 - Release Date: 2005/09/29
> 
>


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/115 - Release Date: 2005/09/29


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by Sunitha Kambhampati <ks...@gmail.com>.
TomohitoNakayama wrote:

> Hello.
>
> I have one question ...
>
>> I looked at the patch briefly, and had one minor comment.  In 
>> convertToAsciiByteArray, it might be better performance wise, if we 
>> calculate the original.length only once and use it in the for loop.
>
>
> Can it be improvement of performance so much ?
>
> Length of String object cannot be changed and there would be very less 
> performance improvement .
> //Improvement would be just saving time of calling method .
>
I think it is cheaper to store the int value, rather than calling the 
method N times.  I did a simple test just to get some numbers with using 
the length() versus calculating once.  Note- this test doesnt make much 
sense otherwise..

string length = 810023
test  calls method  length() each time   = 140 ms
test precomputes length and uses the stored length = 90ms.

ex.
        for(int j= 0; j < len; j++)
        {
            if (sb1.charAt(j) == 'a')
            {
               c = sb1.charAt(j);
            }
        }

versus,  computing the length() each time.
---------------

Java^TM Performance Tuning and Java Optimization Tips : 
ftp://ftp.glenmccl.com/pub/free/jperf.pdf  : check out section 4.5.where 
the author mentions some timing details, although the example code is 
not right. :(

Hope this helps,
Sunitha.

> Rather, I feel question for adding (local) variable , because I don't 
> want to increase number of variable even if it is local ....
>
> Best regards.
>
> /*
>
>         Tomohito Nakayama
>         tomonaka@basil.ocn.ne.jp
>         tomohito@rose.zero.ad.jp
>         tmnk@apache.org
>
>         Naka
>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>
> */
> ----- Original Message ----- From: "Sunitha Kambhampati (JIRA)" 
> <de...@db.apache.org>
> To: <de...@db.apache.org>
> Sent: Friday, September 30, 2005 2:13 AM
> Subject: [jira] Commented: (DERBY-525) getAsciiStreamshould replace 
> non-ASCII characters with 0x3f, '?' to match embedded
>
>
>>    [ 
>> http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330828 
>> ]
>>
>> Sunitha Kambhampati commented on DERBY-525:
>> -------------------------------------------
>>
>> It would be great if you could add a testcase for this.
>>
>> I looked at the patch briefly, and had one minor comment.  In 
>> convertToAsciiByteArray, it might be better performance wise, if we 
>> calculate the original.length only once and use it in the for loop.
>>
>>


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.

I have one question ...

> I looked at the patch briefly, and had one minor comment.  In convertToAsciiByteArray, it might be better performance wise, if we 
> calculate the original.length only once and use it in the for loop.

Can it be improvement of performance so much ?

Length of String object cannot be changed and there would be very less performance improvement .
//Improvement would be just saving time of calling method .

Rather, I feel question for adding (local) variable , because I don't want to increase number of variable even if it is local ....

Best regards.

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>
To: <de...@db.apache.org>
Sent: Friday, September 30, 2005 2:13 AM
Subject: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330828 ]
>
> Sunitha Kambhampati commented on DERBY-525:
> -------------------------------------------
>
> It would be great if you could add a testcase for this.
>
> I looked at the patch briefly, and had one minor comment.  In convertToAsciiByteArray, it might be better performance wise, if we 
> calculate the original.length only once and use it in the for loop.
>
>
>> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
>> -----------------------------------------------------------------------------------
>>
>>          Key: DERBY-525
>>          URL: http://issues.apache.org/jira/browse/DERBY-525
>>      Project: Derby
>>         Type: Bug
>>   Components: Network Client
>>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>>     Reporter: Kathey Marsden
>>     Assignee: Tomohito Nakayama
>>      Fix For: 10.2.0.0
>>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>>
>> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if
>> the column type is a character type or a CLOB, then any out of
>> range character (to the ASCII set) needs to be replaced by 0x3f
>> ('?', question mark). ASCII is defined as 8 bit characters,
>> thus Unicode Characters in the range 0x0000 to 0x00ff are
>> mapped to ASCII characters 0x00 to 0xff, and Unicode characters
>> in the range 0x0100 to 0xffff are mapped to 0x3f
>> By code inspection:
>> client code in
>> org.apache.derby.client.am.ResultSet
>> embedded in
>> org.apache.derby.impl.jdbc.ReaderToAscii
>
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
>   http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
>   http://www.atlassian.com/software/jira
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.8/114 - Release Date: 2005/09/28
>
> 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.8/114 - Release Date: 2005/09/28


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Sunitha Kambhampati (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330828 ] 

Sunitha Kambhampati commented on DERBY-525:
-------------------------------------------

It would be great if you could add a testcase for this.

I looked at the patch briefly, and had one minor comment.  In convertToAsciiByteArray, it might be better performance wise, if we calculate the original.length only once and use it in the for loop.


> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330183 ] 

Tomohito Nakayama commented on DERBY-525:
-----------------------------------------

I'm interested in this issue :)

Surveying about ASCII, I found that ASCII is 7bit information and not 8bit information , in some context .
  http://www.ietf.org/rfc/rfc20.txt
  http://en.wikipedia.org/wiki/ASCII

Should we think range 0x80 to 0xff as ASCII in this issue ?

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama

>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.
I was continuing seeing failure in the test ....


In the part where next difference  was found , the test code seems that length of data was intentionally broken
I read these messages that error was correctly handled in network environment .

12 del
< EXPECTED SQLSTATE(XSDA4): An unexpected exception was thrown
13 del
< EXPECTED SQLSTATE(XJ001): Java exception: 'Input stream held less data than requested length.: java.io.IOException'.
14 del
< EXPECTED SQLSTATE(XSDA4): An unexpected exception was thrown
15 del
< EXPECTED SQLSTATE(XJ001): Java exception: 'Input stream held less data than requested length.: java.io.IOException'.
15a13,14
> EXPECTED SQLSTATE(null): End of Stream prematurely reached while reading InputStream, parameter #2.  Remaining data has been 
> padded with 0x0.
> EXPECTED SQLSTATE(null): The specified size of the InputStream, parameter #2, is less than the actual InputStream length


On the other hand , next error seems to not be a just error messaging problem .
8a9
> FAIL - stream was not closed after a get*() call. class java.io.ByteArrayInputStream


Well, these are completely different problems than DERBY-525.
I will make them as new issue on JIRA .

Best regards.

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "Sunitha Kambhampati" <ks...@gmail.com>
To: "Derby Development" <de...@db.apache.org>
Sent: Sunday, October 02, 2005 3:02 PM
Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


> TomohitoNakayama wrote:
>
>> Hello .
>>
>> I have executed resultsetStream.java in network environment .
>> And found error attached to this mail as resultsetStream.diff .
>>
>> It seems that output of part commented as next in resultsetStream.java is different between network and embedded environments .
>>
> I think we should add a jira bug and link it to Derby 310, so this difference in behavior can be addressed.
> I am concerned about this line in the diff , it may not be per the standard ?
> > EXPECTED SQLSTATE(null): End of Stream prematurely reached while
> reading InputStream, parameter #2.  Remaining data has been padded with 0x0.
>
> Do you know why there is this append in  the diff file ..
> 8a9
> > FAIL - stream was not closed after a get*() call. class
> java.io.ByteArrayInputStream
>
> If it is something that needs to be looked into, maybe a jira entry needs to be added.
>
> Thanks,
> Sunitha.
>
>>   // check binary input streams of invalid length.
>>   // JDBC 3.0 tutorial says stream contents must match length.
>>
>> Now, I'm thinking to add resultsetStream_sed.properties to avoid this problem .
>>
>> Best regards .
>>
>> /*
>>
>>         Tomohito Nakayama
>>         tomonaka@basil.ocn.ne.jp
>>         tomohito@rose.zero.ad.jp
>>         tmnk@apache.org
>>
>>         Naka
>>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>>
>> */
>> ----- Original Message ----- From: "TomohitoNakayama" <to...@basil.ocn.ne.jp>
>> To: "Derby Development" <de...@db.apache.org>
>> Sent: Sunday, October 02, 2005 1:36 PM
>> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded
>>
>>
>>> Hello.
>>>
>>> I didn't realize it was excluded. Well, I will try executing  ./functionTests/tests/jdbcapi/resultsetStream.java in network 
>>> environment test before modify ./functionTests/tests/jdbcapi/resultsetStream.java .
>>>
>>> //If there exists what must be done in resultsetStream.java , I think new issue may be needed for that .
>>>
>>> Best regards.
>>>
>>> /*
>>>
>>>         Tomohito Nakayama
>>>         tomonaka@basil.ocn.ne.jp
>>>         tomohito@rose.zero.ad.jp
>>>         tmnk@apache.org
>>>
>>>         Naka
>>>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>>>
>>> */
>>> ----- Original Message ----- From: "Sunitha Kambhampati" <ks...@gmail.com>
>>> To: "Derby Development" <de...@db.apache.org>
>>> Sent: Sunday, October 02, 2005 2:12 AM
>>> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded
>>>
>>>
>>>> Tomohito Nakayama (JIRA) wrote:
>>>>
>>>>>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ]
>>>>> Tomohito Nakayama commented on DERBY-525:
>>>>> -----------------------------------------
>>>>>
>>>>> I surveyed where to add test and found next test program .
>>>>> I think this  program is good place to add test for this issue .
>>>>>
>>>>> ./functionTests/tests/jdbcapi/resultsetStream.java
>>>>>
>>>> Maybe you already noticed, this test seems to be currently excluded and wont run against the network server. 
>>>> (.../functionTests/suites/DerbyNetClient.exclude ).
>>>> I am not sure why it doesnt run against the server as yet but suspect maybe it is because of lob materialization issues  If you 
>>>> plan to enable this test to run against server, that sounds good.
>>>>
>>>> Thanks,
>>>> Sunitha.
>>>>
>>>>
>>>>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
>
> 



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by Sunitha Kambhampati <ks...@gmail.com>.
TomohitoNakayama wrote:

> Hello .
>
> I have executed resultsetStream.java in network environment .
> And found error attached to this mail as resultsetStream.diff .
>
> It seems that output of part commented as next in resultsetStream.java 
> is different between network and embedded environments .
>
I think we should add a jira bug and link it to Derby 310, so this 
difference in behavior can be addressed.  

I am concerned about this line in the diff , it may not be per the 
standard ?
 > EXPECTED SQLSTATE(null): End of Stream prematurely reached while 
reading InputStream, parameter #2.  Remaining data has been padded with 0x0.

Do you know why there is this append in  the diff file ..
8a9
 > FAIL - stream was not closed after a get*() call. class 
java.io.ByteArrayInputStream

If it is something that needs to be looked into, maybe a jira entry 
needs to be added.

Thanks,
Sunitha.

>   // check binary input streams of invalid length.
>   // JDBC 3.0 tutorial says stream contents must match length.
>
> Now, I'm thinking to add resultsetStream_sed.properties to avoid this 
> problem .
>
> Best regards .
>
> /*
>
>         Tomohito Nakayama
>         tomonaka@basil.ocn.ne.jp
>         tomohito@rose.zero.ad.jp
>         tmnk@apache.org
>
>         Naka
>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>
> */
> ----- Original Message ----- From: "TomohitoNakayama" 
> <to...@basil.ocn.ne.jp>
> To: "Derby Development" <de...@db.apache.org>
> Sent: Sunday, October 02, 2005 1:36 PM
> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould 
> replace non-ASCII characters with 0x3f, '?' to match embedded
>
>
>> Hello.
>>
>> I didn't realize it was excluded. Well, I will try executing  
>> ./functionTests/tests/jdbcapi/resultsetStream.java in network 
>> environment test before modify 
>> ./functionTests/tests/jdbcapi/resultsetStream.java .
>>
>> //If there exists what must be done in resultsetStream.java , I think 
>> new issue may be needed for that .
>>
>> Best regards.
>>
>> /*
>>
>>         Tomohito Nakayama
>>         tomonaka@basil.ocn.ne.jp
>>         tomohito@rose.zero.ad.jp
>>         tmnk@apache.org
>>
>>         Naka
>>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
>>
>> */
>> ----- Original Message ----- From: "Sunitha Kambhampati" 
>> <ks...@gmail.com>
>> To: "Derby Development" <de...@db.apache.org>
>> Sent: Sunday, October 02, 2005 2:12 AM
>> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould 
>> replace non-ASCII characters with 0x3f, '?' to match embedded
>>
>>
>>> Tomohito Nakayama (JIRA) wrote:
>>>
>>>>    [ 
>>>> http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 
>>>> ]
>>>> Tomohito Nakayama commented on DERBY-525:
>>>> -----------------------------------------
>>>>
>>>> I surveyed where to add test and found next test program .
>>>> I think this  program is good place to add test for this issue .
>>>>
>>>> ./functionTests/tests/jdbcapi/resultsetStream.java
>>>>  
>>>>
>>> Maybe you already noticed, this test seems to be currently excluded 
>>> and wont run against the network server. 
>>> (.../functionTests/suites/DerbyNetClient.exclude ).
>>> I am not sure why it doesnt run against the server as yet but 
>>> suspect maybe it is because of lob materialization issues  If you 
>>> plan to enable this test to run against server, that sounds good.
>>>
>>> Thanks,
>>> Sunitha.
>>>
>>>
>>>


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello .

I have executed resultsetStream.java in network environment .
And found error attached to this mail as resultsetStream.diff .

It seems that output of part commented as next in resultsetStream.java is different between network and embedded environments .

   // check binary input streams of invalid length.
   // JDBC 3.0 tutorial says stream contents must match length.

Now, I'm thinking to add resultsetStream_sed.properties to avoid this problem .

Best regards .

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "TomohitoNakayama" <to...@basil.ocn.ne.jp>
To: "Derby Development" <de...@db.apache.org>
Sent: Sunday, October 02, 2005 1:36 PM
Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


> Hello.
> 
> I didn't realize it was excluded. 
> Well, I will try executing  ./functionTests/tests/jdbcapi/resultsetStream.java in network environment test 
> before modify ./functionTests/tests/jdbcapi/resultsetStream.java .
> 
> //If there exists what must be done in resultsetStream.java , I think new issue may be needed for that .
> 
> Best regards.
> 
> /*
> 
>         Tomohito Nakayama
>         tomonaka@basil.ocn.ne.jp
>         tomohito@rose.zero.ad.jp
>         tmnk@apache.org
> 
>         Naka
>         http://www5.ocn.ne.jp/~tomohito/TopPage.html
> 
> */
> ----- Original Message ----- 
> From: "Sunitha Kambhampati" <ks...@gmail.com>
> To: "Derby Development" <de...@db.apache.org>
> Sent: Sunday, October 02, 2005 2:12 AM
> Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded
> 
> 
>> Tomohito Nakayama (JIRA) wrote:
>> 
>>>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ] 
>>>
>>>Tomohito Nakayama commented on DERBY-525:
>>>-----------------------------------------
>>>
>>>I surveyed where to add test and found next test program .
>>>I think this  program is good place to add test for this issue .
>>>
>>>./functionTests/tests/jdbcapi/resultsetStream.java
>>>  
>>>
>> Maybe you already noticed, this test seems to be currently excluded and 
>> wont run against the network server. 
>> (.../functionTests/suites/DerbyNetClient.exclude ).
>> I am not sure why it doesnt run against the server as yet but suspect 
>> maybe it is because of lob materialization issues  If you plan to enable 
>> this test to run against server, that sounds good.
>> 
>> Thanks,
>> Sunitha.
>> 
>> 
>> 
>> 
>> -- 
>> No virus found in this incoming message.
>> Checked by AVG Anti-Virus.
>> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
>> 
>>
> 
> 
> -- 
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
> 
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
>

Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by TomohitoNakayama <to...@basil.ocn.ne.jp>.
Hello.

I didn't realize it was excluded. 
Well, I will try executing  ./functionTests/tests/jdbcapi/resultsetStream.java in network environment test 
before modify ./functionTests/tests/jdbcapi/resultsetStream.java .

//If there exists what must be done in resultsetStream.java , I think new issue may be needed for that .

Best regards.

/*

         Tomohito Nakayama
         tomonaka@basil.ocn.ne.jp
         tomohito@rose.zero.ad.jp
         tmnk@apache.org

         Naka
         http://www5.ocn.ne.jp/~tomohito/TopPage.html

*/
----- Original Message ----- 
From: "Sunitha Kambhampati" <ks...@gmail.com>
To: "Derby Development" <de...@db.apache.org>
Sent: Sunday, October 02, 2005 2:12 AM
Subject: Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded


> Tomohito Nakayama (JIRA) wrote:
> 
>>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ] 
>>
>>Tomohito Nakayama commented on DERBY-525:
>>-----------------------------------------
>>
>>I surveyed where to add test and found next test program .
>>I think this  program is good place to add test for this issue .
>>
>>./functionTests/tests/jdbcapi/resultsetStream.java
>>  
>>
> Maybe you already noticed, this test seems to be currently excluded and 
> wont run against the network server. 
> (.../functionTests/suites/DerbyNetClient.exclude ).
> I am not sure why it doesnt run against the server as yet but suspect 
> maybe it is because of lob materialization issues  If you plan to enable 
> this test to run against server, that sounds good.
> 
> Thanks,
> Sunitha.
> 
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30
> 
>


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.9/116 - Release Date: 2005/09/30


Re: [jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by Sunitha Kambhampati <ks...@gmail.com>.
Tomohito Nakayama (JIRA) wrote:

>    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ] 
>
>Tomohito Nakayama commented on DERBY-525:
>-----------------------------------------
>
>I surveyed where to add test and found next test program .
>I think this  program is good place to add test for this issue .
>
>./functionTests/tests/jdbcapi/resultsetStream.java
>  
>
Maybe you already noticed, this test seems to be currently excluded and 
wont run against the network server. 
(.../functionTests/suites/DerbyNetClient.exclude ).
 I am not sure why it doesnt run against the server as yet but suspect 
maybe it is because of lob materialization issues  If you plan to enable 
this test to run against server, that sounds good.

Thanks,
Sunitha.


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331017 ] 

Tomohito Nakayama commented on DERBY-525:
-----------------------------------------

I surveyed where to add test and found next test program .
I think this  program is good place to add test for this issue .

./functionTests/tests/jdbcapi/resultsetStream.java

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-525?page=all ]

Tomohito Nakayama updated DERBY-525:
------------------------------------

    Attachment: DERBY-525_3.patch

Description of patch :
   * modified java/client/org/apache/derby/client/am/AsciiStream.java ,which was used in Clob when getAsciiStream was called , to convert character that is not ASCII to '?' .
   * removed modification of DERBY-525.patch, and use AsciiStream here too, instead .

Test:
   * run derbyall and found no new error .


> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, DERBY-525_3.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Kathey Marsden (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-525?page=all ]
     
Kathey Marsden closed DERBY-525:
--------------------------------


> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug

>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, DERBY-525_3.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-525?page=all ]

Tomohito Nakayama updated DERBY-525:
------------------------------------

    Attachment: DERBY-525_2.patch

Modification:
 Tuning on convertToAsciiByteArray(final) was done according to next mails.
 http://permalink.gmane.org/gmane.comp.apache.db.derby.devel/8548
 http://permalink.gmane.org/gmane.comp.apache.db.derby.devel/8528

 //However new test is not added yet.
 //DERBY-596 is dedicated for new test .


Tested:
 Execute derbyall and new error was not found .



> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, DERBY-525_2.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-525?page=all ]

Tomohito Nakayama updated DERBY-525:
------------------------------------

    Attachment: DERBY-525.patch
                DERBY-525.site.patch
                derbyall_report.txt

DERBY-525.patch :
Description of patches :
1: modify processing of converting String to byte[] in org.apache.derby.client.am.ResultSet#getAsciiStream(int) 

Test :
Executed derby all and found an error in runtimeinfo . 
I read that this error happens because processing of each thread in runtimeinfo finshed not in the same sequence of  starting the thread .
I attach derbyall_report.txt to this issue also.


DERBY-525.site.patch :
Description of patch :
Modify paper on the derby site , according to http://article.gmane.org/gmane.comp.apache.db.derby.devel/8378.

Test :
I executed "forrest run" and browse the page at http://localhost:8888/papers/JDBCImplementation.html .


> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12355604 ] 

Tomohito Nakayama commented on DERBY-525:
-----------------------------------------

I have executed 'jdbcapi/resultsetStream.java' ,which was modified for DERBY-525 , 
and found the problem was deeper than I thought , and DERBY-525.patch did not solve the problem yet .

Because high byte of none ASCII character was cleared as 0x00 for some reason , 
it was impossible to replace none ASCII character as '?' just comparing with 0x00ff .

I survey why high byte of character was cleared .

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-525?page=all ]

Tomohito Nakayama updated DERBY-525:
------------------------------------

    Attachment:     (was: DERBY-525_2.patch)

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12331648 ] 

Tomohito Nakayama commented on DERBY-525:
-----------------------------------------

I realized DERBY-525_2.patch ,which was not commited yet , 
has a bug that calling String#getByte() use in this patch is mistake.

I removed the patch from this issue.


> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Daniel John Debrunner (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330193 ] 

Daniel John Debrunner commented on DERBY-525:
---------------------------------------------

See this link for the justifications on why getAsciiStream() uses 8 bits and not 7.

http://db.apache.org/derby/papers/JDBCImplementation.html#GetAsciiStream%28%29

Basically, it's based upon definitions from the JDBC spec.

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama

>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330100 ] 

Tomohito Nakayama commented on DERBY-525:
-----------------------------------------

I think that character other than ASCII need to be handled in Clob ....



> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden

>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330794 ] 

Tomohito Nakayama commented on DERBY-525:
-----------------------------------------

I have committed patches.

Sending        java/client/org/apache/derby/client/am/ResultSet.java
Transmitting file data .
Committed revision 292414.

Sending        src/documentation/content/xdocs/papers/JDBCImplementation.html
Transmitting file data .
Committed revision 292415.

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330102 ] 

Tomohito Nakayama commented on DERBY-525:
-----------------------------------------

Sorry.
I misread  this issue.

This was issue about getAsciiStream .

Character other than ASCII should be handled in ResultSet#getCharacterStream .
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#getCharacterStream(int)
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#getCharacterStream(java.lang.String)

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden

>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Reopened: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-525?page=all ]
     
Tomohito Nakayama reopened DERBY-525:
-------------------------------------


> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Bernt M. Johnsen (JIRA)" <de...@db.apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-525?page=comments#action_12330185 ] 

Bernt M. Johnsen commented on DERBY-525:
----------------------------------------

In my opinion ASCII (and ISO-646) is a 7-bit standard which is compatible with Unicode values 0x0000-0x007f. Unicode values 0x0000-0x00ff are compatible with ISO-8859-1 which to my knowledge is not compatible with any of the (non-standard) "extended" ASCII charactersets which have been in use. 


> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama

>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (DERBY-525) getAsciiStreamshould replace non-ASCII characters with 0x3f, '?' to match embedded

Posted by "Tomohito Nakayama (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-525?page=all ]
     
Tomohito Nakayama resolved DERBY-525:
-------------------------------------

    Resolution: Fixed

I have committed .

Sending        java/client/org/apache/derby/client/am/AsciiStream.java
Sending        java/client/org/apache/derby/client/am/ResultSet.java
Sending        java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/resultsetStream.out
Sending        java/testing/org/apache/derbyTesting/functionTests/master/resultsetStream.out
Sending        java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/resultsetStream.java
Transmitting file data .....
Committed revision 329372.

> getAsciiStreamshould replace non-ASCII characters with 0x3f, '?'  to match embedded
> -----------------------------------------------------------------------------------
>
>          Key: DERBY-525
>          URL: http://issues.apache.org/jira/browse/DERBY-525
>      Project: Derby
>         Type: Bug
>   Components: Network Client
>     Versions: 10.1.2.0, 10.1.1.0, 10.2.0.0
>     Reporter: Kathey Marsden
>     Assignee: Tomohito Nakayama
>      Fix For: 10.2.0.0
>  Attachments: DERBY-525.patch, DERBY-525.site.patch, DERBY-525_3.patch, derbyall_report.txt
>
> When calling Clob.getAsciiStream or ResultSet.getAsciiStream if 
> the column type is a character type or a CLOB, then any out of 
> range character (to the ASCII set) needs to be replaced by 0x3f 
> ('?', question mark). ASCII is defined as 8 bit characters, 
> thus Unicode Characters in the range 0x0000 to 0x00ff are 
> mapped to ASCII characters 0x00 to 0xff, and Unicode characters 
> in the range 0x0100 to 0xffff are mapped to 0x3f
> By code inspection:
> client code in 
> org.apache.derby.client.am.ResultSet
> embedded in 
> org.apache.derby.impl.jdbc.ReaderToAscii

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira