Skip to content

Commit

Permalink
fix: use UTF-8 as default encoding for files ~ resolves #5133
Browse files Browse the repository at this point in the history
If we create journal abbrev files via the JabRef, they are saved in UTF-8.
So it makes sense to use this as default encoding. Also see #5133.
  • Loading branch information
stefan-kolb committed Aug 24, 2019
1 parent 4477a13 commit 6b6f68a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public void readJournalListFromResource(String resourceFileName) {
}

public void readJournalListFromFile(File file) throws FileNotFoundException {
try (FileReader reader = new FileReader(Objects.requireNonNull(file))) {
try (FileInputStream stream = new FileInputStream(Objects.requireNonNull(file));
InputStreamReader reader = new InputStreamReader(stream, Objects.requireNonNull(StandardCharsets.UTF_8))) {
readJournalList(reader);
} catch (FileNotFoundException e) {
throw e;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.slf4j.LoggerFactory;

public class JournalAbbreviationLoader {

private static final Logger LOGGER = LoggerFactory.getLogger(JournalAbbreviationLoader.class);

// journal initialization
Expand Down

0 comments on commit 6b6f68a

Please sign in to comment.