aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml/src
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2024-05-08 22:32:22 +0000
committerPJ Fanning <fanningpj@apache.org>2024-05-08 22:32:22 +0000
commitb91827e029a8b6fadf4f81bf84d082b2ecb314e5 (patch)
treec7485017efb5ec238f26dadc365251900eb338fd /poi-ooxml/src
parentc0c70cac7a09438399f3ac77e694c3f8706a8d87 (diff)
downloadpoi-b91827e029a8b6fadf4f81bf84d082b2ecb314e5.tar.gz
poi-b91827e029a8b6fadf4f81bf84d082b2ecb314e5.zip
[bug-68987] support allowStoredEntriesWithDataDescriptor=true when reading zip data
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917587 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml/src')
-rw-r--r--poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java
index f9b1524da9..5fb580530e 100644
--- a/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java
+++ b/poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java
@@ -24,6 +24,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
+import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
@@ -189,7 +190,8 @@ public final class ZipHelper {
final InputStream processStream = closeStream ? checkedStream : new NoCloseInputStream(checkedStream);
// Open as a proper zip stream
- return new ZipArchiveThresholdInputStream(new ZipArchiveInputStream(processStream));
+ return new ZipArchiveThresholdInputStream(new ZipArchiveInputStream(
+ processStream, StandardCharsets.UTF_8.name(), false, true));
}
/**