bug/deficiency in zip: non-ascii chars in file names work, but fail in directory names

Doug Henderson djndnbvg@gmail.com
Sat Nov 1 07:14:00 GMT 2014


On 31 October 2014 23:00, Brent wrote:
>
>
> It seems that cygwin's zip can archive files whose name includes non-ascii (unicode) chars just fine, but if you try to archive a directory whose name includes such chars, it fails.

>     $ zip test.zip åØâéñ
>       adding: åØâéñ/ (stored 0%)

You need to add the -r option to recurse into directories:

$ zip -r test.zip åØâéñ
  adding: åØâéñ/ (stored 0%)
  adding: åØâéñ/㐀丁龦豈侮.txt (stored 0%)

$ mkdir tmp2 ; cd tmp2 ; unzip -l ../test2.zip
Archive:  ../test2.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  11-01-2014 01:00   ??????????/
       28  11-01-2014 01:00   ??????????/???????????????.txt
---------                     -------
       28                     2 files

$ ls -lR
.:
total 0
drwxr-xr-x+ 1 Doug None 0 Nov  1 01:00 åØâéñ/

./åØâéñ:
total 1.0K
-rw-r--r-- 1 Doug None 28 Nov  1 01:00 㐀丁龦豈侮.txt

So, it appears to me that zip/unzip do not fail when you use the -r option.

Doug

-- 
Doug Henderson, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list