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] Created: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources
Date Tue, 14 Oct 2008 04:45:44 GMT
[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.


Mime
View raw message