Patch for #55594 from Paul Vonnahme - Fix SXSSF encodings on EBC

IDIC platforms, by setting the required encoding explicitly

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1580314 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2014-03-22 20:48:58 +00:00
parent 3868a2cdc7
commit 8bee2665b3
2 changed files with 4 additions and 3 deletions

View File

@ -60,7 +60,7 @@ public class GZIPSheetDataWriter extends SheetDataWriter {
*/ */
@Override @Override
public Writer createWriter(File fd)throws IOException { public Writer createWriter(File fd)throws IOException {
return new OutputStreamWriter(new GZIPOutputStream(new FileOutputStream(fd))); return new OutputStreamWriter(new GZIPOutputStream(new FileOutputStream(fd)), "UTF-8");
} }

View File

@ -22,9 +22,10 @@ package org.apache.poi.xssf.streaming;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileWriter; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.Writer; import java.io.Writer;
import java.util.Iterator; import java.util.Iterator;
@ -84,7 +85,7 @@ public class SheetDataWriter {
* @param fd the file to write to * @param fd the file to write to
*/ */
public Writer createWriter(File fd)throws IOException { public Writer createWriter(File fd)throws IOException {
return new BufferedWriter(new FileWriter(fd)); return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(fd), "UTF-8"));
} }
/** /**