]> source.dussan.org Git - poi.git/commitdiff
forbidden api issue
authorPJ Fanning <fanningpj@apache.org>
Fri, 14 May 2021 02:09:44 +0000 (02:09 +0000)
committerPJ Fanning <fanningpj@apache.org>
Fri, 14 May 2021 02:09:44 +0000 (02:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889872 13f79535-47bb-0310-9956-ffa450edef68

poi/src/test/java/org/apache/poi/hssf/extractor/TestOldExcelExtractor.java

index c9438fd990fb61cbb7cad201cb00d4a9b3493bf6..4f541ee468efd12aa4acc509944e1e7a77e3a121 100644 (file)
@@ -41,6 +41,7 @@ import org.apache.poi.hssf.HSSFTestDataSamples;
 import org.apache.poi.poifs.filesystem.OfficeXmlFileException;
 import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 import org.apache.commons.io.output.NullPrintStream;
+import org.apache.poi.util.LocaleUtil;
 import org.apache.poi.util.RecordFormatException;
 import org.junit.jupiter.api.Test;
 
@@ -323,7 +324,7 @@ final class TestOldExcelExtractor {
         File file = HSSFTestDataSamples.getSampleFile("testEXCEL_3.xls");
         PrintStream save = System.out;
         try (UnsynchronizedByteArrayOutputStream out = new UnsynchronizedByteArrayOutputStream();
-             PrintStream str = new PrintStream(out, false, StandardCharsets.UTF_8.displayName())) {
+             PrintStream str = new PrintStream(out, false, StandardCharsets.UTF_8.displayName(LocaleUtil.getUserLocale()))) {
             System.setOut(str);
             OldExcelExtractor.main(new String[] {file.getAbsolutePath()});
             String string = out.toString(StandardCharsets.UTF_8);