Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-615

The ZipArchiveSerializer doesn't support UTF-8 encoded names

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.3
    • None
    • None
    • None

      The ZipArchiveSerializer doesn't support UTF-8 encoded names: when an entry's name has 2-bytes characters (outside ISO-8859 charset, such as accented characters), they are incorrectly encoded.
      When opening a zip archive created by this serializer with Ubuntu's file roller archiver, the file inside is named "test document accentué.pdf".

          [RUNTIME-615] The ZipArchiveSerializer doesn't support UTF-8 encoded names

          Nicolas Gavalda (Inactive) added a comment - - edited

          Apparently, Sun's JDK classes ZipOutputStream/ZipEntry are responsible for this behavior.
          Apache commons compress library defines classes replacing these ones (ZipArchiveOutputStream and ZipArchiveEntry) which partly resolve this issue (full documentation at http://commons.apache.org/compress/zip.html, section "Encoding").

          Here's a replacement proposal for ZipArchiveSerializer, which makes use of commons compress' classes instead of default JDK ones.
          It resolves the problem with Ubuntu's file roller and 7-zip file manager on Windows XP, but not with Win XP's "zip as folder".

          Nicolas Gavalda (Inactive) added a comment - - edited Apparently, Sun's JDK classes ZipOutputStream/ZipEntry are responsible for this behavior. Apache commons compress library defines classes replacing these ones (ZipArchiveOutputStream and ZipArchiveEntry) which partly resolve this issue (full documentation at http://commons.apache.org/compress/zip.html , section "Encoding"). Here's a replacement proposal for ZipArchiveSerializer, which makes use of commons compress' classes instead of default JDK ones. It resolves the problem with Ubuntu's file roller and 7-zip file manager on Windows XP, but not with Win XP's "zip as folder".

            ngavalda Nicolas Gavalda (Inactive)
            ngavalda Nicolas Gavalda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: