A few days ago a co-worker (they are forced to use CVS Ant 8-) had a problem when he added a file whose name contained german umlauts to a jar file using Ant's jar task.
While Winzip and InfoZip don't have any problems with the file, you couldn't use the jar file from Java as java.util.zip.ZipInputStream obviously expects filenames to be UTF-8 encoded - something neither Winzip nor InfoZip do BTW. The documentation I've used for reference (appnotes.iz from the InfoZip distribution) doesn't talk about filename encoding at all. The new classes in the org.apache.tools.zip package don't specify a specific encoding, which means the filenames will be encoded according to the local platforms default encoding (again, this is what InfoZip does as well) - this in turn makes the filenames illegal UTF-8 Strings and Java will not load the jar file. What I want to do now, is to add an optional charencoding attribute to <zip> and friends that will default to the platform's default encoding for <zip> and to UTF-8 for <jar>/<war>/<ear>. Does anybody see any problems with this approach? Stefan
