fix: #I7VP0I 检测文件失败时,使用系统默认编码
This commit is contained in:
parent
13382d2cd4
commit
c678fda573
@ -60,7 +60,7 @@ public class EncodingDetector {
|
||||
public static Charset detectEncodingCharset(File file) {
|
||||
String charset = detectEncoding(file);
|
||||
if (charset.equals(UNKNOWN)) {
|
||||
return StandardCharsets.UTF_8;
|
||||
return Charset.defaultCharset();
|
||||
}
|
||||
return Charset.forName(charset);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user