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

Incorrect implementation of UTF-8 in zip package

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7
    • 5.0
    • core-libs
    • b57
    • generic
    • generic

      Name: nl37777 Date: 04/12/2004

      Several parts of the zip package handle the UTF-8 encoding
      of entry names incorrectly. They assume either an ancient form of UTF-8
      which didn't have the 4-byte form for supplementary characters, or rely
      on the JVM's modified UTF-8, which has the same limitation. As a
      consequence, file names using supplementary characters can be used, but
      cannot be exchanged with standards-compliant zip implementations.

      The following parts of the implementation are incorrect:
      src/share/classes/java/util/zip/ZipInputStream.java
           getUTF8String
      src/share/classes/java/util/zip/ZipOutputStream.java
           getUTF8Length
           getUTF8Bytes
      src/share/native/java/util/zip/ZipEntry.c
           Java_java_util_zip_ZipEntry_initFields
      src/share/native/java/util/zip/ZipFile.c
           Java_java_util_zip_ZipFile_getEntry
           Java_java_util_jar_JarFile_getMetaInfEntryNames
      ======================================================================

            sherman Xueming Shen
            nlindenbsunw Norbert Lindenberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: