7050570: (fs) FileSysteProvider fails to initializes if run with file.encoding set to Cp037

Alan Bateman Alan.Bateman at oracle.com
Wed Aug 15 05:05:55 PDT 2012


This is another one that has been in my patch queue for a while, 
actually from before jdk7 shipped as it arose with someone trying tests 
with file.encoding set on the command line (something that has never 
been supported but sometimes useful for tests). It's also an issue that 
came up recently on the core-libs list [1] where someone was trying to 
do something similar.

The changes here just change the file system provider to use 
sun.jnu.encoding property as the charset to use when encoding/decoding 
file names. I think eventually we should be use this consistently and 
leaving file.encoding to the file content. The assumption remains in the 
code that there aren't any locales that map to UTF-16 or other encoding 
that require shift in/out. If there were such a locale then more further 
changes would be required in order to deal with multi-byte slash a few 
others used in the code.

Sherman - I think you would be the best person to review this. The 
webrev with the changes is here:
   http://cr.openjdk.java.net/~alanb/7050570/webrev/

-Alan.

[1] 
http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-July/010758.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20120815/bb3e6540/attachment.html 


More information about the nio-dev mailing list