7003155: (fs) Paths.get(<file-uri>) does not handle escaped octets correctly

Xueming Shen xueming.shen at oracle.com
Tue Dec 7 12:07:36 PST 2010


Alan, why UTF-8 is being used here? The default charset should be used to
do the conversion between byte[] and String. It appears the toUri should
also do a byte[] -> String (default charset) -> byte[] (utf-8) before
escaping.

-Sherman



On 11/29/2010 08:27 AM, Alan Bateman wrote:
>
> The code for converting URIs to Paths in the Solaris/Linux file system 
> provider is not correct. It's using the decoded path component of the 
> URI (ie: de-quoted) and so must be converted from UTF-8. The webrev 
> with the change is here:
>  http://cr.openjdk.java.net/~alanb/7003155/webrev/
>
> Thanks,
> Alan.



More information about the nio-dev mailing list