harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-535) [classlib][luni] java.io.File doesn't properly work with the file names which have non-latin chars
Date Fri, 05 Jan 2007 22:15:27 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462619
] 

Tim Ellison commented on HARMONY-535:
-------------------------------------

Problem is that we compute the properPath using byte[] rather than String representation of
the path.  Simple test shows different behavior on RI vs. Harmony:

        String fname = "C:\\temp\\\u0440\u0443\u0441";
        File f = new File(fname);
        String canonPath = f.getCanonicalPath();

        System.out.println(fname);
        System.out.println(canonPath);
        System.out.println("Equal = " + fname.equals(canonPath));


> [classlib][luni] java.io.File doesn't properly work with the file names which have non-latin
chars
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-535
>                 URL: https://issues.apache.org/jira/browse/HARMONY-535
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: J9, Windows
>            Reporter: Anton Avtamonov
>            Priority: Minor
>
> java.io.File doesn't properly work with  the file names which has non-latin chars on
Windows (I tried Russian) .
> Minimal test case:
> import java.io.File;
> import junit.framework.TestCase;
> public class FileEncodingTest extends TestCase {
>     private File russianNamedDir;
>     protected void tearDown() throws Exception {
>         russianNamedDir.delete();
>     }
>     public void testCreateNonLatinDirectory() throws Exception {
>         russianNamedDir = new File("c:\\temp\\\u0440\u0443\u0441_dir"); //coded 'rus'
in Russian transliteration.
>         russianNamedDir.mkdirs();
>         assertTrue(russianNamedDir.isDirectory());
>     }
> }
> The very important thing here is that Control Panel > Regional And Language Options
> Regional Options tab > "Standards and formats" setting is set to "English US". All
other regional settings (location, language for non-unicode programs) are set to Russian.
If I switch "Standards and formats" to Russian everything works fine.
> Same problem with other extended unicode chars.

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

        

Mime
View raw message