2 years ago
#41640
missing木木
Springboot use FileInputStream to read file(chinese name) in linux Failed
//filePath:/root/pcl/代码安全审计报告.xlsx
File file = new File(filePath);
InputStream is = new FileInputStream(file);
is.close();
Charset.defaultCharset().name() is "UTF-8" System.getProperty("file.encoding") is "UTF-8" too. exception: java.io.FileNotFoundException: /root/pcl/���밲ȫ��Ʊ���.xlsx (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138)
cjk
0 Answers
Your Answer