2
我解压缩文件在Windows下的Groovy脚本是这样的:AntBuilder解压缩编码
def ant = new AntBuilder()
ant.unzip( src: path.absolutePath,
dest: directoryName,
overwrite: "false")
zip文件包含在他们的名字与德国变音文件(如“格吕克”),这些文件名被损坏解压后。很明显,我遇到了一个编码问题。于是,我就设置编码:
def ant = new AntBuilder()
ant.unzip( src: path.absolutePath,
dest: directoryName,
overwrite: "false",
encoding: "XXX")
但无论编码我尝试(从这个site),我是不是能够解决我的问题:
"windows-1252"
或"cp1252"
导致的java.nio .charset.UnmappableCharacterException"ISO-8859-1"
只是删除了特殊字符"Utf-8"
,"native-encoding"
或没有编码会导致错误的字符
有谁知道如何解决这个问题?