From cd3b91417cc5df60f464ffbef57f4f8d3188e194 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 21 Jul 2011 02:21:57 +0000 Subject: [PATCH] java.util.zip now supports the EFS flag, http://blogs.oracle.com/xuemingshen/entry/non_utf_8_encoding_in git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1149009 13f79535-47bb-0310-9956-ffa450edef68 --- manual/Tasks/zip.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/manual/Tasks/zip.html b/manual/Tasks/zip.html index 9231047d7..a378a9a2c 100644 --- a/manual/Tasks/zip.html +++ b/manual/Tasks/zip.html @@ -337,6 +337,12 @@ archive.

jars from your CLASSPATH reads and writes UTF-8 names, it doesn't set or recognize any flags or unicode extra fields. +
  • Starting with Java7 java.util.zip writes UTF-8 by + default and uses the language encoding flag. It is possible to + specify a different encoding when reading/writing ZIPs via new + constructors. The package now recognizes the language encoding + flag when reading and ignores the Unicode extra fields.
  • +
  • 7Zip writes CodePage 437 by default but uses UTF-8 and the language encoding flag when writing entries that cannot be encoded as CodePage 437 (similar to the zip task with fallbacktoUTF8 set @@ -367,8 +373,8 @@ archive.

    If you are creating jars, then java.util.zip is your main consumer. We recommend you set the encoding to UTF-8 and keep the language encoding flag enabled. The flag won't help or hurt - java.util.zip but archivers that support it will show the correct - file names.

    + java.util.zip prior to Java7 but archivers that support it will show + the correct file names.

    For maximum interop it is probably best to set the encoding to UTF-8, enable the language encoding flag and create unicode extra