You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Kevin Zhou (JIRA)" <ji...@apache.org> on 2008/10/14 06:45:44 UTC

[jira] Created: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources

[classlib] [luni] java.net.URL does not support Japanese-named resources
------------------------------------------------------------------------

                 Key: HARMONY-5998
                 URL: https://issues.apache.org/jira/browse/HARMONY-5998
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M7
            Reporter: Kevin Zhou
             Fix For: 5.0M8, 5.0M7


The attached "URLTest" test case demonstrates that HY shows difference from RI's behaviors.
Scenario 1: Given a text file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.txt"
(S1.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
(S1.2) Use URLEncoder.encode(String s, String enc) to encode urlStr using "UTF8" schema, then employ URL.openStream to open the corresponding file. RI successfully finds this file while HY fails to decode urlStr to "file:c:\samples\閵夊棎鍋i妷鍫涘仚閵夌鍋test.txt" with some corrupt characters and throws FileNotFoundException. 
(S1.3) Use URLEncoder.encode(String s, String enc) to encode urlStr using "GB2312" schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.

In similar, as to scenario 2: 
Given a jar file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.jar", HY will also show the above different behaviors from RI.
(S2.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
(S2.2) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
(S2.3) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.

In addition, it also occurs on Chinese-named resources.

Shall us follow RI's behaviors on this issue?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources

Posted by Kevin Zhou <zh...@gmail.com>.
Ok, thanks Regis.

On Wed, Oct 15, 2008 at 3:59 PM, Regis Xu (JIRA) <ji...@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/HARMONY-5998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639755#action_12639755]
>
> Regis Xu commented on HARMONY-5998:
> -----------------------------------
>
> Hi Kevin,
>
> when i download the test case, the Japanese characters "�ƥ��ȥ��`��" become to
> unrecognizable, maybe I have different locale setting with you. So I think
> it's better to use "\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9" to represent them,
> and then test case could be run correctly anywhere
>
> > [classlib] [luni] java.net.URL does not support Japanese-named resources
> > ------------------------------------------------------------------------
> >
> >                 Key: HARMONY-5998
> >                 URL: https://issues.apache.org/jira/browse/HARMONY-5998
> >             Project: Harmony
> >          Issue Type: Bug
> >          Components: Classlib
> >    Affects Versions: 5.0M7
> >            Reporter: Kevin Zhou
> >             Fix For: 5.0M7, 5.0M8
> >
> >         Attachments: samples.zip, URLTest.java
> >
> >   Original Estimate: 48h
> >  Remaining Estimate: 48h
> >
> > The attached "URLTest" test case demonstrates that HY shows difference
> from RI's behaviors.
> > Scenario 1: Given a text file located in a Japanese-named folder,
> urlStr="file:c:/samples/�ƥ��ȥ��`��/test.txt"
> > (S1.1) Use URLEncoder.encode(String s) to encode urlStr using default
> encoding schema, then employ URL.openStream to open the corresponding file.
> RI throws IllegalArgumentException while HY doesn't.
> > (S1.2) Use URLEncoder.encode(String s, String enc) to encode urlStr using
> "UTF8" schema, then employ URL.openStream to open the corresponding file. RI
> successfully finds this file while HY fails to decode urlStr to
> "file:c:\samples\銉嗐偣銉堛偙銉笺偣Ptest.txt" with some corrupt characters and
> throws FileNotFoundException.
> > (S1.3) Use URLEncoder.encode(String s, String enc) to encode urlStr using
> "GB2312" schema, then employ URL.openStream to open the corresponding file.
> RI throws IllegalArgumentException while HY doesn't.
> > In similar, as to scenario 2:
> > Given a jar file located in a Japanese-named folder,
> urlStr="file:c:/samples/�ƥ��ȥ��`��/test.jar", HY will also show the above
> different behaviors from RI.
> > (S2.1) Use URLEncoder.encode(String s) to encode urlStr using default
> encoding schema, then employ URL.openConnection to connect the corresponding
> file. RI throws IllegalArgumentException while HY doesn't.
> > (S2.2) Use URLEncoder.encode(String s) to encode urlStr using default
> encoding schema, then employ URL.openConnection to connect the corresponding
> file. RI throws IllegalArgumentException while HY doesn't.
> > (S2.3) Use URLEncoder.encode(String s) to encode urlStr using default
> encoding schema, then employ URL.openConnection to connect the corresponding
> file. RI throws IllegalArgumentException while HY doesn't.
> > In addition, it also occurs on Chinese-named resources.
> > Shall us follow RI's behaviors on this issue?
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Updated: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou updated HARMONY-5998:
--------------------------------

    Attachment: HARMONY-5998.diff

Would you please help to try it?

> [classlib] [luni] java.net.URL does not support Japanese-named resources
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5998
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5998
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M7
>            Reporter: Kevin Zhou
>             Fix For: 5.0M7, 5.0M8
>
>         Attachments: HARMONY-5998.diff, samples.zip, URLTest.java
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> The attached "URLTest" test case demonstrates that HY shows difference from RI's behaviors.
> Scenario 1: Given a text file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.txt"
> (S1.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S1.2) Use URLEncoder.encode(String s, String enc) to encode urlStr using "UTF8" schema, then employ URL.openStream to open the corresponding file. RI successfully finds this file while HY fails to decode urlStr to "file:c:\samples\閵夊棎鍋i妷鍫涘仚閵夌鍋test.txt" with some corrupt characters and throws FileNotFoundException. 
> (S1.3) Use URLEncoder.encode(String s, String enc) to encode urlStr using "GB2312" schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In similar, as to scenario 2: 
> Given a jar file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.jar", HY will also show the above different behaviors from RI.
> (S2.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.2) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.3) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In addition, it also occurs on Chinese-named resources.
> Shall us follow RI's behaviors on this issue?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou updated HARMONY-5998:
--------------------------------

    Attachment: samples.zip

> [classlib] [luni] java.net.URL does not support Japanese-named resources
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5998
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5998
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M7
>            Reporter: Kevin Zhou
>             Fix For: 5.0M7, 5.0M8
>
>         Attachments: samples.zip, URLTest.java
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> The attached "URLTest" test case demonstrates that HY shows difference from RI's behaviors.
> Scenario 1: Given a text file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.txt"
> (S1.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S1.2) Use URLEncoder.encode(String s, String enc) to encode urlStr using "UTF8" schema, then employ URL.openStream to open the corresponding file. RI successfully finds this file while HY fails to decode urlStr to "file:c:\samples\閵夊棎鍋i妷鍫涘仚閵夌鍋test.txt" with some corrupt characters and throws FileNotFoundException. 
> (S1.3) Use URLEncoder.encode(String s, String enc) to encode urlStr using "GB2312" schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In similar, as to scenario 2: 
> Given a jar file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.jar", HY will also show the above different behaviors from RI.
> (S2.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.2) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.3) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In addition, it also occurs on Chinese-named resources.
> Shall us follow RI's behaviors on this issue?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639301#action_12639301 ] 

Kevin Zhou commented on HARMONY-5998:
-------------------------------------

Here is correct description for scenario2:
Given a jar file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.jar", HY will also show the above different behaviors from RI.
(S2.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
(S2.2) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI successfully finds this file while HY fails to decode urlStr to "file:c:\samples\閵夊棎鍋i妷鍫涘仚閵夌鍋\test.jar" with some corrupt characters and throws FileNotFoundException.
(S2.3) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't. 

> [classlib] [luni] java.net.URL does not support Japanese-named resources
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5998
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5998
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M7
>            Reporter: Kevin Zhou
>             Fix For: 5.0M7, 5.0M8
>
>         Attachments: samples.zip, URLTest.java
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> The attached "URLTest" test case demonstrates that HY shows difference from RI's behaviors.
> Scenario 1: Given a text file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.txt"
> (S1.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S1.2) Use URLEncoder.encode(String s, String enc) to encode urlStr using "UTF8" schema, then employ URL.openStream to open the corresponding file. RI successfully finds this file while HY fails to decode urlStr to "file:c:\samples\閵夊棎鍋i妷鍫涘仚閵夌鍋test.txt" with some corrupt characters and throws FileNotFoundException. 
> (S1.3) Use URLEncoder.encode(String s, String enc) to encode urlStr using "GB2312" schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In similar, as to scenario 2: 
> Given a jar file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.jar", HY will also show the above different behaviors from RI.
> (S2.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.2) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.3) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In addition, it also occurs on Chinese-named resources.
> Shall us follow RI's behaviors on this issue?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12639755#action_12639755 ] 

Regis Xu commented on HARMONY-5998:
-----------------------------------

Hi Kevin,

when i download the test case, the Japanese characters "テストケース" become to unrecognizable, maybe I have different locale setting with you. So I think it's better to use "\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9" to represent them, and then test case could be run correctly anywhere

> [classlib] [luni] java.net.URL does not support Japanese-named resources
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5998
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5998
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M7
>            Reporter: Kevin Zhou
>             Fix For: 5.0M7, 5.0M8
>
>         Attachments: samples.zip, URLTest.java
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> The attached "URLTest" test case demonstrates that HY shows difference from RI's behaviors.
> Scenario 1: Given a text file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.txt"
> (S1.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S1.2) Use URLEncoder.encode(String s, String enc) to encode urlStr using "UTF8" schema, then employ URL.openStream to open the corresponding file. RI successfully finds this file while HY fails to decode urlStr to "file:c:\samples\閵夊棎鍋i妷鍫涘仚閵夌鍋test.txt" with some corrupt characters and throws FileNotFoundException. 
> (S1.3) Use URLEncoder.encode(String s, String enc) to encode urlStr using "GB2312" schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In similar, as to scenario 2: 
> Given a jar file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.jar", HY will also show the above different behaviors from RI.
> (S2.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.2) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.3) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In addition, it also occurs on Chinese-named resources.
> Shall us follow RI's behaviors on this issue?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659194#action_12659194 ] 

Kevin Zhou commented on HARMONY-5998:
-------------------------------------

Hi Tim,
Thanks for you comments.
Does this test case fail with RI or the patch? 
I don't meet with such a failure on both RI and our  patched code.




> [classlib] [luni] java.net.URL does not support Japanese-named resources
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5998
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5998
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M7
>            Reporter: Kevin Zhou
>             Fix For: 5.0M7, 5.0M8
>
>         Attachments: HARMONY-5998.diff, samples.zip, URLTest.java
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> The attached "URLTest" test case demonstrates that HY shows difference from RI's behaviors.
> Scenario 1: Given a text file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.txt"
> (S1.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S1.2) Use URLEncoder.encode(String s, String enc) to encode urlStr using "UTF8" schema, then employ URL.openStream to open the corresponding file. RI successfully finds this file while HY fails to decode urlStr to "file:c:\samples\閵夊棎鍋i妷鍫涘仚閵夌鍋test.txt" with some corrupt characters and throws FileNotFoundException. 
> (S1.3) Use URLEncoder.encode(String s, String enc) to encode urlStr using "GB2312" schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In similar, as to scenario 2: 
> Given a jar file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.jar", HY will also show the above different behaviors from RI.
> (S2.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.2) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.3) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In addition, it also occurs on Chinese-named resources.
> Shall us follow RI's behaviors on this issue?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources

Posted by "Kevin Zhou (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Zhou updated HARMONY-5998:
--------------------------------

    Attachment: URLTest.java

> [classlib] [luni] java.net.URL does not support Japanese-named resources
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5998
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5998
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M7
>            Reporter: Kevin Zhou
>             Fix For: 5.0M7, 5.0M8
>
>         Attachments: samples.zip, URLTest.java
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> The attached "URLTest" test case demonstrates that HY shows difference from RI's behaviors.
> Scenario 1: Given a text file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.txt"
> (S1.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S1.2) Use URLEncoder.encode(String s, String enc) to encode urlStr using "UTF8" schema, then employ URL.openStream to open the corresponding file. RI successfully finds this file while HY fails to decode urlStr to "file:c:\samples\閵夊棎鍋i妷鍫涘仚閵夌鍋test.txt" with some corrupt characters and throws FileNotFoundException. 
> (S1.3) Use URLEncoder.encode(String s, String enc) to encode urlStr using "GB2312" schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In similar, as to scenario 2: 
> Given a jar file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.jar", HY will also show the above different behaviors from RI.
> (S2.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.2) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.3) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In addition, it also occurs on Chinese-named resources.
> Shall us follow RI's behaviors on this issue?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5998?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659095#action_12659095 ] 

Tim Ellison commented on HARMONY-5998:
--------------------------------------

I get a testcase failure with this patch...

should throw IllegalArgumentException

junit.framework.AssertionFailedError: should throw IllegalArgumentException
at org.apache.harmony.luni.tests.java.net.WinJarURLConnectionTest.test_NON_ASCII(WinJarURLConnectionTest.java:48)
at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25)

> [classlib] [luni] java.net.URL does not support Japanese-named resources
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-5998
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5998
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M7
>            Reporter: Kevin Zhou
>             Fix For: 5.0M7, 5.0M8
>
>         Attachments: HARMONY-5998.diff, samples.zip, URLTest.java
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> The attached "URLTest" test case demonstrates that HY shows difference from RI's behaviors.
> Scenario 1: Given a text file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.txt"
> (S1.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S1.2) Use URLEncoder.encode(String s, String enc) to encode urlStr using "UTF8" schema, then employ URL.openStream to open the corresponding file. RI successfully finds this file while HY fails to decode urlStr to "file:c:\samples\閵夊棎鍋i妷鍫涘仚閵夌鍋test.txt" with some corrupt characters and throws FileNotFoundException. 
> (S1.3) Use URLEncoder.encode(String s, String enc) to encode urlStr using "GB2312" schema, then employ URL.openStream to open the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In similar, as to scenario 2: 
> Given a jar file located in a Japanese-named folder, urlStr="file:c:/samples/テストケース/test.jar", HY will also show the above different behaviors from RI.
> (S2.1) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.2) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> (S2.3) Use URLEncoder.encode(String s) to encode urlStr using default encoding schema, then employ URL.openConnection to connect the corresponding file. RI throws IllegalArgumentException while HY doesn't.
> In addition, it also occurs on Chinese-named resources.
> Shall us follow RI's behaviors on this issue?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.