ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dima Rogozin" <>
Subject problem with ZipOutputStream and windows-1252 Encoding
Date Wed, 31 May 2006 03:00:45 GMT


We have recently switched to use ANT Zip classes (ANT 1.6.5) instead of
Sun classes. This worked quite successful till I have found one problem
with interoperability between Ant Zip package and WinZip utility. I hope
somebody can help me explain what is going on.

It looks like windows-1252 encoded filenames cannot be read by WinZip.

This is a test case:
1. Make a small file having Copyright and TM symbols in its name. 
2. Zip it up using Winzip and Ant ZIP (encoding set to windows-1252).
3. Open Winzip zipped file in WinZip: file name correctly shows
copyright and trademark.
4. Open Ant Zip created zip in WinZip: file name is corrupted.

If you look inside the actual zip archive you will see that file name is
actually correctly encoded. But something prevents WinZip to read it
correctly. The Ant zipped archive is very different from WinZip one. It
has a number of fields zeroed out and some other fields are different
too. May be something gets WinZip confused?

Another anecdotal evidence of the problem is the fact that Emacs is
capable of reading WinZip zipped archive but it issues some strange
error trying to read Ant zipped one.

This is a really big problem for us and I would appreciate any feedback
on the problem.

Thanks a lot,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message