harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Regis Xu (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-5998) [classlib] [luni] java.net.URL does not support Japanese-named resources
Date Wed, 15 Oct 2008 07:59:44 GMT

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


Mime
View raw message