pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r1773559 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java
Date Sun, 11 Dec 2016 11:14:44 GMT
Author: lehmi
Date: Sun Dec 11 11:14:43 2016
New Revision: 1773559

URL: http://svn.apache.org/viewvc?rev=1773559&view=rev
Log:
PDFBOX-3625: use UTF-8 as file encoding

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java?rev=1773559&r1=1773558&r2=1773559&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/fdf/FDFDocument.java Sun Dec
11 11:14:43 2016
@@ -22,10 +22,10 @@ import java.io.Closeable;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.io.FileWriter;
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.io.OutputStreamWriter;
 import java.io.Writer;
 
 import org.apache.pdfbox.cos.COSDictionary;
@@ -301,7 +301,8 @@ public class FDFDocument implements Clos
      */
     public void saveXFDF(File fileName) throws IOException
     {
-        saveXFDF(new BufferedWriter(new FileWriter(fileName)));
+        saveXFDF(new BufferedWriter(
+                new OutputStreamWriter(new FileOutputStream(fileName), "UTF-8")));
     }
 
     /**
@@ -313,7 +314,8 @@ public class FDFDocument implements Clos
      */
     public void saveXFDF(String fileName) throws IOException
     {
-        saveXFDF(new BufferedWriter(new FileWriter(fileName)));
+        saveXFDF(new BufferedWriter(
+                new OutputStreamWriter(new FileOutputStream(fileName), "UTF-8")));
     }
 
     /**



Mime
View raw message