Skip to content

Commit a84a757

Browse files
committed
PDFBOX-5660: avoid default encoding
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1927167 13f79535-47bb-0310-9956-ffa450edef68
1 parent b4de669 commit a84a757

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFAnnotationStamp.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.io.ByteArrayInputStream;
2020
import java.io.IOException;
2121
import java.io.OutputStream;
22+
import java.nio.charset.StandardCharsets;
2223

2324
import javax.xml.xpath.XPath;
2425
import javax.xml.xpath.XPathExpressionException;
@@ -115,7 +116,7 @@ public FDFAnnotationStamp(Element element) throws IOException
115116
}
116117
if (base64EncodedAppearance != null && !base64EncodedAppearance.isEmpty())
117118
{
118-
LOG.debug("Decoded XML: {}", () -> new String(decodedAppearanceXML));
119+
LOG.debug("Decoded XML: {}", () -> new String(decodedAppearanceXML, StandardCharsets.UTF_8));
119120

120121
Document stampAppearance = XMLUtil
121122
.parse(new ByteArrayInputStream(decodedAppearanceXML));

0 commit comments

Comments
 (0)