RFE 4519026: (process) Process should support Unicode on Win NT, request for review (original) (raw)
Martin Buchholz martinrb at google.com
Mon Mar 23 18:19:49 UTC 2009
- Previous message: RFE 4519026: (process) Process should support Unicode on Win NT, request for review
- Next message: RFE 4519026: (process) Process should support Unicode on Win NT, request for review
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alan asks a very good question.
The kinds of pathname conversion done by getNativePath is likely already implemented in Java code somewhere. E.g. there is this comment in ProcessImpl.java:
// Win32 CreateProcess requires cmd[0] to be normalized
cmd[0] = new File(cmd[0]).getPath();
I've always considered the primary purpose of getNativePath to be native charset encoding, but for the win32 "W" API this is a no-op because we are converting UTF-16 to UTF-16.
So I suspect we can get rid of that icky C code in getNativePath entirely, perhaps simply replacing it by java calls to getPath() or similar functionality extracted from something in NIO2, which is in jdk7 since b50.
Martin
On Mon, Mar 23, 2009 at 10:55, Alan Bateman <Alan.Bateman at sun.com> wrote:
I'm not an expert on the Process code but is the directory already normalized at this point? Just wondering if all of getNativePath is needed.
-Alan.
- Previous message: RFE 4519026: (process) Process should support Unicode on Win NT, request for review
- Next message: RFE 4519026: (process) Process should support Unicode on Win NT, request for review
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]