Skip to content

Commit

Permalink
[bug-68987] support allowStoredEntriesWithDataDescriptor=true when re…
Browse files Browse the repository at this point in the history
…ading zip data

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1917587 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
pjfanning committed May 8, 2024
1 parent c0c70ca commit b91827e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
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;
Expand Down Expand Up @@ -189,7 +190,8 @@ public static ZipArchiveThresholdInputStream openZipStream(

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

/**
Expand Down

0 comments on commit b91827e

Please sign in to comment.