harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou" <zhoukevi...@gmail.com>
Subject Re: [jira] Updated: (HARMONY-6041) [classlib][portlib] incorrect parse path contains special unicode charactor
Date Tue, 16 Dec 2008 06:27:20 GMT
Would you please help to try this?

On Thu, Dec 11, 2008 at 3:07 PM, Regis Xu (JIRA) <jira@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/HARMONY-6041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Regis Xu updated HARMONY-6041:
> ------------------------------
>
>    Attachment: HARMONY-6041.diff
>
> in this patch,  phase of calculate absolute path is after convert to
> unicode, and use unicode version GetFullPathNameW
>
> > [classlib][portlib] incorrect parse path contains special unicode
> charactor
> >
> ---------------------------------------------------------------------------
> >
> >                 Key: HARMONY-6041
> >                 URL: https://issues.apache.org/jira/browse/HARMONY-6041
> >             Project: Harmony
> >          Issue Type: Bug
> >          Components: Classlib
> >    Affects Versions: 5.0M8
> >            Reporter: Regis Xu
> >             Fix For: 5.0M9
> >
> >         Attachments: HARMONY-6041.diff
> >
> >
> > test case:
> >         String s = "\u5C73";
> >         File file = new File(s);
> >         System.out.println(file.mkdir());
> >         System.out.println(file.exists());
> >         System.out.println(file.getCanonicalPath());
> > output of RI:
> > true
> > true
> > C:\work\workspace\temp\
> > output of Harmony:
> > false
> > true
> > C:\work\workspace\temp\?
> > I found the root cause is in hyfile.c:convert_path_to_unicode, which
> convert UTF-8 byte array to unicode byte array
> > at hyfile.c::437 invoke
> > GetFullPathNameA(path, ABS_PATH_BUF_LEN, absPath, (void*) 0)
> > GetFullPathNameA is ANSI version, but path is encoded as UTF-8,  this may
> corrupt the path.
> > I have got a fix for this, will attach patch soon.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message