Uploaded image for project: 'Commons Compress'
  1. Commons Compress
  2. COMPRESS-176

ArchiveInputStream#getNextEntry(): Problems with WinZip directories with Umlauts

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3
    • 1.4
    • Archivers
    • None
    • Windows 7

    Description

      There is a problem when handling a WinZip-created zip with Umlauts in directories.

      I'm accessing a zip file created with WinZip containing a directory with an umlaut ("รค") with ArchiveInputStream. When creating the zip file the unicode-flag of winzip had been active.

      The following problem occurs when accessing the entries of the zip:
      the ArchiveEntry for a directory containing an umlaut is not marked as a directory and the file names for the directory and all files contained in that directory contain backslashes instead of slashes (i.e. completely different to all other files in directories with no umlaut in their path).

      There is no difference when letting the ArchiveStreamFactory decide which ArchiveInputStream to create or when using the ZipArchiveInputStream constructor with the correct encoding (I've tried different encodings CP437, CP850, ISO-8859-15, but still the problem persisted).

      This problem does not occur when using the very same zip file but compressed by 7zip or the built-in Windows 7 zip functionality.

      Attachments

        1. testzap-winzip.zip
          0.9 kB
          Sebb
        2. test-winzip.zip
          0.9 kB
          Wurstbrot mit Senf
        3. test-windows.zip
          0.7 kB
          Wurstbrot mit Senf
        4. test-doublevertical.zip
          0.3 kB
          Stefan Bodewig
        5. test-7zip.zip
          0.8 kB
          Wurstbrot mit Senf
        6. MkZip.java
          0.6 kB
          Stefan Bodewig

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bodewig Stefan Bodewig
            wurstbrot Wurstbrot mit Senf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment