Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4415733

util.zip does not support umlaut (mutated vowel) in file/path-names in zip file

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_98, windows_nt, windows_2000, windows_2003, windows_xp

      Description

      Name: boT120536 Date: 02/15/2001


      java version "1.3.0_01"
      java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
      Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)

      If file or path-names in a zip-file contain a (german) umlaut (mutated vowel,
      i.e. "???) or a "?", getNextEntry (when targeting to such a file or path)
      throws an IllegalArgumentException.

      The error appears in: JDK 1.2.2, JDK 1.3, but *not* in JDK 1.1.8 (which doesn't
      help much, for others zip-related errors in 1.1.8).

      1. Exact steps to reproduce the problem:

      Create a zip-file called "test.zip" containing a file called "test?.tst" (or
      something like that) (use winzip or rar). Place the zip in the current
      directory.

      2. Java SOURCE CODE that demonstrates the problem:

      import java.io.*;
      import java.util.zip.*;
      public class ZIPTest {
        public static void main(String[] args) throws IOException {
          ZipInputStream zis = new ZipInputStream(new FileInputStream
      (System.getProperty("user.dir")+File.separatorChar+"test.zip"));
          ZipEntry ze;
          while ((ze = zis.getNextEntry()) != null) {}
          zis.close();
        }
      }

      3. Exact text of any error message(s) that appeared:

      java.lang.IllegalArgumentException
      at java.util.zip.ZipInputStream.getUTF8String(ZipInputStream.java:285)
      at java.util.zip.ZipInputStream.readLOC(ZipInputStream.java:230)
      at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:75)
      at ZIPTest.main(ZIPTest.java:7)
      Exception in thread "main"
      (Review ID: 116860)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              martin Martin Buchholz
              Reporter:
              bonealsunw Bret O'neal (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: