Skip to content

Commit bf50b99

Browse files
committed
1 parent 9129611 commit bf50b99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/jabref/logic/importer/Importer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ protected static Charset getCharset(BufferedInputStream bufferedInputStream) {
121121
return defaultCharSet;
122122
}
123123

124-
if (Arrays.stream(matches).anyMatch(charset -> "ASCII".equals(charset.getName()))) {
124+
// if we have utf8 with 100 confidence we
125+
if (Arrays.stream(matches).anyMatch(charset -> "ASCII".equals(charset.getName()) || ("UTF-8".equals(charset.getName()) && charset.getConfidence() == 100))) {
125126
return defaultCharSet;
126127
}
127128

0 commit comments

Comments
 (0)