I am trying to copy a file on an ubuntu machine using the java statement
Files.copy(new File("/tmp/source/测试.xlsx").toPath(), new File("/tmp/dest/测试.xlsx").toPath(), StandardCopyOption.REPLACE_EXISTING);
But i get the following error
java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /tmp/source/测试.xlsx at sun.nio.fs.UnixPath.encode(UnixPath.java:147) ~[na:1.8.0_91] at sun.nio.fs.UnixPath.(UnixPath.java:71) ~[na:1.8.0_91] at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281) ~[na:1.8.0_91] at java.io.File.toPath(File.java:2234) ~[na:1.8.0_91]
This runs perfectly fine when i run it on my eclipse. Also, the code works fine with all english characters.