RFE 4519026: (process) Process should support Unicode on Win NT, request for review
martinrb at google.com
Mon Mar 23 18:19:49 UTC 2009
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 to be normalized
cmd = new File(cmd).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.
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.
More information about the core-libs-dev