You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2009/02/27 16:29:25 UTC

svn commit: r748556 - in /commons/sandbox/compress/trunk/src: main/java/org/apache/commons/compress/archivers/zip/ZipFile.java test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java

Author: bodewig
Date: Fri Feb 27 15:29:25 2009
New Revision: 748556

URL: http://svn.apache.org/viewvc?rev=748556&view=rev
Log:
look for Unicode extra fields by default

Modified:
    commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
    commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java

Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java?rev=748556&r1=748555&r2=748556&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java (original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipFile.java Fri Feb 27 15:29:25 2009
@@ -132,7 +132,7 @@
 
     /**
      * Opens the given file for reading, assuming the specified
-     * encoding for file names and ignoring unicode extra fields.
+     * encoding for file names, scanning unicode extra fields.
      *
      * @param name name of the archive.
      * @param encoding the encoding to use for file names, use null
@@ -141,12 +141,12 @@
      * @throws IOException if an error occurs while reading the file.
      */
     public ZipFile(String name, String encoding) throws IOException {
-        this(new File(name), encoding, false);
+        this(new File(name), encoding, true);
     }
 
     /**
      * Opens the given file for reading, assuming the specified
-     * encoding for file names and ignoring unicode extra fields.
+     * encoding for file names and scanning for unicode extra fields.
      *
      * @param f the archive.
      * @param encoding the encoding to use for file names, use null
@@ -155,7 +155,7 @@
      * @throws IOException if an error occurs while reading the file.
      */
     public ZipFile(File f, String encoding) throws IOException {
-        this(f, encoding, false);
+        this(f, encoding, true);
     }
 
     /**

Modified: commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java?rev=748556&r1=748555&r2=748556&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java (original)
+++ commons/sandbox/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/UTF8ZipFilesTest.java Fri Feb 27 15:29:25 2009
@@ -89,7 +89,7 @@
         File archive = new File(new URI(zip.toString()));
         ZipFile zf = null;
         try {
-            zf = new ZipFile(archive, CP437);
+            zf = new ZipFile(archive, CP437, false);
             assertNotNull(zf.getEntry(ASCII_TXT));
             assertNotNull(zf.getEntry(EURO_FOR_DOLLAR_TXT));
             assertNotNull(zf.getEntry(OIL_BARREL_TXT));
@@ -199,7 +199,7 @@
         throws IOException {
         ZipFile zf = null;
         try {
-            zf = new ZipFile(file, encoding);
+            zf = new ZipFile(file, encoding, false);
 
             Enumeration e = zf.getEntries();
             while (e.hasMoreElements()) {