fixed UTF-8 encoding for output XML
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>com.github.rayman2200</groupId>
|
<groupId>com.github.rayman2200</groupId>
|
||||||
<artifactId>mustang-sample-project</artifactId>
|
<artifactId>mustang-sample-project</artifactId>
|
||||||
<version>1.2.1-SNAPSHOT</version>
|
<version>1.3.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<groupId>org.mustangproject.ZUGFeRD</groupId>
|
<groupId>org.mustangproject.ZUGFeRD</groupId>
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class ZUGFeRDExporter {
|
|||||||
jaxbContext = JAXBContext.newInstance("org.mustangproject.ZUGFeRD.model");
|
jaxbContext = JAXBContext.newInstance("org.mustangproject.ZUGFeRD.model");
|
||||||
marshaller = jaxbContext.createMarshaller();
|
marshaller = jaxbContext.createMarshaller();
|
||||||
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
|
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
|
||||||
marshaller.setProperty("jaxb.encoding", "UTF-8");
|
marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
|
||||||
}
|
}
|
||||||
|
|
||||||
private class LineCalc {
|
private class LineCalc {
|
||||||
@@ -749,7 +749,7 @@ public class ZUGFeRDExporter {
|
|||||||
// create a dummy file stream, this would probably normally be a
|
// create a dummy file stream, this would probably normally be a
|
||||||
// FileInputStream
|
// FileInputStream
|
||||||
|
|
||||||
byte[] zugferdRaw = getZugferdXMLForTransaction(trans).getBytes("UTF-8"); //$NON-NLS-1$
|
byte[] zugferdRaw = getZugferdXMLForTransaction(trans).getBytes(); //$NON-NLS-1$
|
||||||
|
|
||||||
if ((zugferdRaw[0] == (byte) 0xEF) && (zugferdRaw[1] == (byte) 0xBB) && (zugferdRaw[2] == (byte) 0xBF)) {
|
if ((zugferdRaw[0] == (byte) 0xEF) && (zugferdRaw[1] == (byte) 0xBB) && (zugferdRaw[2] == (byte) 0xBF)) {
|
||||||
// I don't like BOMs, lets remove it
|
// I don't like BOMs, lets remove it
|
||||||
|
|||||||
Reference in New Issue
Block a user