have tests for visualization and ubl convert. Insist in UTF-8 as charset in more cases.

This commit is contained in:
jstaerk
2021-02-02 08:05:10 +01:00
parent 0763ade64e
commit e142a81959
13 changed files with 1679 additions and 9 deletions

View File

@@ -23,6 +23,7 @@ import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
@@ -77,7 +78,7 @@ public class ZUGFeRDVisualizer {
FileInputStream fis=new FileInputStream(xmlFilename);
String fileContent="";
try {
fileContent = new String(Files.readAllBytes(Paths.get(xmlFilename)));
fileContent = new String(Files.readAllBytes(Paths.get(xmlFilename)), StandardCharsets.UTF_8);
} catch (IOException e2) {
LOG.log(Level.SEVERE, null, e2);
}