I have problems reading files whose name has international characters in Mac OS X Lion. It works fine with Java 6 but it doesn't with Java 7. Also it works with the new Java 7 I/O classes, but I would like not to change the API for the time being.
File f = new File("饮茶.png");
Path p = FileSystems.getDefault().getPath("饮茶.png");
System.out.println("New IO API: " + Files.exists(p));
System.out.println("Old IO API: " + f.exists());
Output:
New IO API: true
Old IO API: false
Is there any way to use the old api with Java 7 and international characters?