aboutsummaryrefslogtreecommitdiffstats
path: root/fop-sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'fop-sandbox')
-rw-r--r--fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java9
-rw-r--r--fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java5
2 files changed, 8 insertions, 6 deletions
diff --git a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java
index 93f7c1d8d..08a1b664f 100644
--- a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java
+++ b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFElement.java
@@ -22,6 +22,7 @@ package org.apache.fop.render.mif;
// Java
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.List;
@@ -89,9 +90,9 @@ public class MIFElement {
}
String indentStr = sb.toString();
if (!started) {
- os.write((indentStr + "<" + name).getBytes());
+ os.write((indentStr + "<" + name).getBytes(StandardCharsets.UTF_8));
if (valueElements != null) {
- os.write(("\n").getBytes());
+ os.write(("\n").getBytes(StandardCharsets.UTF_8));
}
started = true;
}
@@ -110,9 +111,9 @@ public class MIFElement {
if (!finish || !done) {
return false;
}
- os.write((indentStr + "> # end of " + name + "\n").getBytes());
+ os.write((indentStr + "> # end of " + name + "\n").getBytes(StandardCharsets.UTF_8));
} else {
- os.write((" " + valueStr + ">\n").getBytes());
+ os.write((" " + valueStr + ">\n").getBytes(StandardCharsets.UTF_8));
}
finished = true;
return true;
diff --git a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java
index c727b2998..1a2b3e599 100644
--- a/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java
+++ b/fop-sandbox/src/main/java/org/apache/fop/render/mif/MIFFile.java
@@ -22,6 +22,7 @@ package org.apache.fop.render.mif;
// Java
import java.io.IOException;
import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.List;
@@ -130,7 +131,7 @@ public class MIFFile extends MIFElement {
}
if (!started) {
- os.write(("<MIFFile 5.00> # Generated by FOP\n"/* + getVersion()*/).getBytes());
+ os.write(("<MIFFile 5.00> # Generated by FOP\n"/* + getVersion()*/).getBytes(StandardCharsets.UTF_8));
started = true;
}
boolean done = true;
@@ -146,7 +147,7 @@ public class MIFFile extends MIFElement {
}
}
if (done && finish) {
- os.write(("# end of MIFFile").getBytes());
+ os.write(("# end of MIFFile").getBytes(StandardCharsets.UTF_8));
}
}