Menu

#1396 The encoding of the filenames (inside a zip file) is not properly detected

open
nobody
None
5
2014-08-16
2014-01-30
Tesf
No

The encoding of the filenames (inside a zip file) is not properly detected in some cases. For example: if someone creates a zip file using Zip (from Info-Zip) in Windows Xp, containing a file named "naïve.text":

zip naïve naïve.text

and copies that file to a Linux machine:
1) If he executes there

unzip -l naïve.zip

it shows

   [...]   naïve.text

2) However, if he executes there

7z l naïve.zip

it shows

   [...]   nave.text

Thanks for all!

Discussion

  • Tesf

    Tesf - 2014-08-07

    There are more tests:

    If someone uses 7-Zip 9.34 alpha in Windows to pack two files (named "sample.txt" and "ñóçà.txt" (using Spanish and French characters)) into a file named "file.zip", then he goes to Linux (e.g. Ubuntu 14.04) and executes

     7z l  'file.zip'
    

    then he sees:

    7-Zip [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
    p7zip Version 9.20 (locale=es_ES.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
    
    Listing archive: file.zip
    
    --
    Path = file.zip
     Type = zip
     Physical Size = 317
    
        Date      Time    Attr         Size   Compressed  Name
     ------------------- ----- ------------ ------------  ------------------------
     2014-08-07 18:27:15 .....            5            5  sample.txt
     2014-08-07 18:26:58 .....           38           30  ¤¢.txt
     ------------------- ----- ------------ ------------  ------------------------
                                         43           35  2 files, 0 folders
    

    And if he executes

     unzip -l  'file.zip'
    

    then he sees:

    Archive:  file.zip
      Length      Date    Time    Name
    ---------  ---------- -----   ----
            5  2014-08-07 18:27   sample.txt
           38  2014-08-07 18:27   двЗЕ.txt
    ---------                     -------
           43                     2 files
    

    It's interesting that "двЗЕ" seems to be made by characters from the Russian alphabet, as Igor Pavlov is Russian, maybe this gives some hints.

    Thank you for 7-Zip!

     
  • Tesf

    Tesf - 2014-08-14

    That problem (that can be seen in Linux using Ark, Zip and similar programs to open zip files) doesn't happen if in Windows it's used:
    - Zip (from Info-Zip).
    or
    - Total Commander 8.01, although with the "Store all names containing non-English in extra field" setting.
    To set that, I went to "Configuration > Options > Packer > Zip packer" and, in the right part, to the "Additional Settings" section, then to "Pack Unicode names" and there I selected "Store all names containing non-English in extra field."

    Thank you for 7-Zip!

     

Log in to post a comment.