harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources
Date Tue, 23 Dec 2008 05:51:44 GMT

     [ 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.


Mime
View raw message