commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wolfgang Glas <wolfgang.g...@ev-i.at>
Subject [compress] [PATCH] Refactoring of zip encoding support.
Date Sun, 01 Mar 2009 21:27:33 GMT
Hello all,

  Well, the latest discussions with Stefan showed two shortcoming of our current
ZIP unicode support:

1) Unicode extra fields are written for all ZIP entries and not only for
entries, which are not encodable by the encoding set to ZipArchiveOutputStream.

2) In order to implement selective writing of unicode specials, one needs a
robust implementation of wether a name can be encoded or not. This is
exspecially inhibtied by the fact, taht Cp437 has been omitted from java-1.4's
java.nio.Charset.

To overcome these shortcoming, I had to introduce a ZipEncoding interface plus a
java.nio implementation and a handcrafted implementation for Cp437 (and cp850)
and refactor all the encoding stuff.

The patch is attached. The new code is IMHO really better to read and make all
cp437-related stuff accessible on java-1.4 as well. The benfit from all these
efforts in the end is, that the cp437 test case now runs flawlessly under java-1.4

  Stefan, might you please review the patch and eventually apply this one?

   TIA,

    Wolfgang

Mime
View raw message