You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ja...@rzf.fin-nrw.de on 2003/10/01 13:19:34 UTC

RE: How to use ZipFile to extract a zip file (with umlauts) creat ed 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
> 

RE: How to use ZipFile to extract a zip file (with umlauts) created by WinZip

Posted by Zsolt Koppany <zk...@intland.com>.
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