Skip to content

Commit

Permalink
get bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Siedlerchr committed Jul 3, 2022
1 parent ca72dff commit 1082f8a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,12 @@ public void testParsingOfUtf16EncodedFileReadsUmlautCharacterCorrectly(String fi
MetaData metaData = new MetaData();
metaData.setMode(BibDatabaseMode.BIBTEX);
metaData.setEncoding(StandardCharsets.UTF_16BE);
BibDatabaseContext bibDatabaseContext = new BibDatabaseContext(new BibDatabase(List.of(new BibEntry(StandardEntryType.Article).withField(StandardField.TITLE, "Ü ist ein Umlaut"))), metaData);
BibDatabase database = new BibDatabase(List.of(new BibEntry(StandardEntryType.Article).withField(StandardField.TITLE, "Ü ist ein Umlaut")));;
database.setNewLineSeparator("\r\n");
BibDatabaseContext bibDatabaseContext = new BibDatabaseContext(database, metaData);

assertEquals(
bibDatabaseContext.getDatabase().getEntries(),
parsedContext.getDatabase().getEntries());
bibDatabaseContext.getDatabase().getEntries().toString().getBytes(),
parsedContext.getDatabase().getEntries().toString().getBytes());
}
}

0 comments on commit 1082f8a

Please sign in to comment.