Browse Source

[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
pull/634/head
PJ Fanning 1 month ago
parent
commit
b91827e029

+ 3
- 1
poi-ooxml/src/main/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java View File

@@ -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));
}

/**

Loading…
Cancel
Save