Author: tilman
Date: Mon Jul 14 04:09:54 2025
New Revision: 1927213

URL: http://svn.apache.org/viewvc?rev=1927213&view=rev
Log:
PDFBOX-5660: avoid default encoding

Modified:
    
pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestEmbeddedFiles.java

Modified: 
pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestEmbeddedFiles.java
URL: 
http://svn.apache.org/viewvc/pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestEmbeddedFiles.java?rev=1927213&r1=1927212&r2=1927213&view=diff
==============================================================================
--- 
pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestEmbeddedFiles.java
 (original)
+++ 
pdfbox/branches/2.0/examples/src/test/java/org/apache/pdfbox/examples/pdmodel/TestEmbeddedFiles.java
 Mon Jul 14 04:09:54 2025
@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.io.InputStream;
 
 import org.apache.pdfbox.io.IOUtils;
+import org.apache.pdfbox.util.Charsets;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -53,7 +54,7 @@ public class TestEmbeddedFiles
         InputStream is = new FileInputStream(embeddedFile);
         byte[] bytes = IOUtils.toByteArray(is);
         is.close();
-        String content = new String(bytes);
+        String content = new String(bytes, Charsets.US_ASCII);
         Assert.assertEquals("This is the contents of the embedded file", 
content);
         new File(embeddedFile).delete();
         new File(outputFile).delete();


Reply via email to