I am unzipping a file under Windows in a Groovy script like this:
def ant = new AntBuilder()
ant.unzip( src: path.absolutePath,
dest: directoryName,
overwrite: "false")
The zip file contains files with German Umlauts in their name (like “Glück”), these file names are damaged after the unzipping. It is clear that I run into an encoding issue here. So I tried to set the encoding:
def ant = new AntBuilder()
ant.unzip( src: path.absolutePath,
dest: directoryName,
overwrite: "false",
encoding: "XXX")
But whatever encoding I tried (from this site), I was not able to solve my issue:
"windows-1252"or"cp1252"lead to an java.nio.charset.UnmappableCharacterException"ISO-8859-1"just removed the special chars"Utf-8","native-encoding"or no encoding lead to wrong characters
Does anyone know how to solve this?
I used
"Cp850"and everything worked. However I had to find the correct code page with try-and-error. I would have expected that UTF-8 will work or that `”native-encoding”´ would find the right encoding as every zip tool does.