I am generating a zip file containing csv using ZipOutputStream
. I have passed the encoding UTF-8 but the problem is that German umlauts are not compressed properly. When uncompressed, they do not appear properly in the file.
I am not sure if the problem is with compression itself or the decompression.
All the topics related to this issue are mainly about special characters in the filename, but for me the problem is appearing in the data.
val zos = ZipOutputStream (outputStream, StandardCharsets.UTF_8)
val entry = ZipEntry("file1.csv")
zos.putNextEntry(entry)
val writer = CsvWriter(zos)
for (entr in data)
writer.appendRow {entr.forEach { write(it) }}
zos.closeEntry()
zos.close()