ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt Koppany" <zkoppanyl...@intland.com>
Subject RE: How to use ZipFile to extract a zip file (with umlauts) created by WinZip
Date Wed, 01 Oct 2003 12:01:17 GMT
Hi Jan,

I created the zip file with WinZip and now try to extract it with ant's
ZipFile.

Here is the constructor:

ZipFile zipFile = new ZipFile(zf, "ISO-8859-1");

And zipEntry.getName() returns: "? ? ?.txt" instead of "ü ö ä".

The question is probably which encoding is used by WinZip. If you created
the zip file by "ant" and WinZip can read it, it just means that WinZip
understands the encoding you used to create the zip file but I need the
other direction: I want to extract zip files created by WinZip.

Zsolt



-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
Sent: Wednesday, October 01, 2003 1:20 PM
To: user@ant.apache.org
Subject: RE: How to use ZipFile to extract a zip file (with umlauts)
created by WinZip


I have no problems with
   <zip destfile="test.zip" basedir="." includes="_*.txt"
encoding="ISO-8859-1"/>
   <unzip src="test.zip" dest="_extracted_" encoding="ISO-8859-1"/>
File "_ÄÖÜ.txt" is correct saved inside the archive (controlled with winzip)
and
correct extracted.


Maybe a version problem. I use the latest CVS HEAD version.


Jan



> -----Original Message-----
> From: Zsolt Koppany [mailto:zkoppanylist@intland.com]
> Sent: Wednesday, October 01, 2003 1:09 PM
> To: Ant Users List
> Subject: How to use ZipFile to extract a zip file (with
> umlauts) created
> by WinZip
>
>
> Hi,
>
> I understand that the ZipFile consturctor supports encoding,
> however I could
> not figure out how to get the filenames that contain German umlauts
> correctly using ZipFile.
>
> Which encoding do I have to use? I have tried "ASCII", "Cp1252",
> "ISO-8859-1" but none of them worked.
>
> Zsolt
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message