Skip to content

Commit

Permalink
[kie-issues#754] Use UTF-8 on important places during Quarkus build (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
baldimir authored Dec 13, 2023
1 parent 3db59dc commit 7065d9f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitOption;
import java.nio.file.FileVisitResult;
import java.nio.file.Files;
Expand Down Expand Up @@ -103,7 +104,7 @@ public static Collection<CollectedResource> fromJarFile(Path jarPath) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry entry = entries.nextElement();
InternalResource resource = new ByteArrayResource(readBytesFromInputStream(zipFile.getInputStream(entry)));
InternalResource resource = new ByteArrayResource(readBytesFromInputStream(zipFile.getInputStream(entry)), StandardCharsets.UTF_8.name());
resource.setSourcePath(entry.getName());
resources.add(toCollectedResource(jarPath, entry.getName(), resource));
}
Expand Down Expand Up @@ -171,7 +172,7 @@ public static Collection<CollectedResource> fromFiles(Path basePath, boolean ign
}

private static CollectedResource toCollectedResource(Path basePath, File file) {
Resource resource = new FileSystemResource(file);
Resource resource = new FileSystemResource(file, StandardCharsets.UTF_8.name());
return toCollectedResource(basePath, file.getName(), resource);
}

Expand Down

0 comments on commit 7065d9f

Please sign in to comment.