FS#17503 - [unzip] zsh completion missing for unzip patches

Attached to Project: Arch Linux
Opened by Philip Nilsson (leffe) - Monday, 14 December 2009, 16:39 GMT
Last edited by Andrea Scarpino (BaSh) - Sunday, 06 March 2011, 00:53 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Roman Kyrylych (Romashka)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

The patch to the unzip package adds the -I and -O flags. These do not work with completion, and break further completion if used.

/usr/share/zsh/4.3.10/functions/Completion/Unix/_zip
-O CHARSET specify a character encoding for DOS, Windows and OS/2 archives
-I CHARSET specify a character encoding for UNIX and other archives
http://repos.archlinux.org/wsvn/packages/unzip/repos/extra-x86_64/unzip60-alt-iconv-utf8.patch
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Sunday, 06 March 2011, 00:53 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#18691 
Comment by Thayer Williams (thayer) - Tuesday, 19 January 2010, 19:45 GMT
Personally, I don't have a problem with removing the patch itself, but it sounds like it will adversely affect anyone that works with zip files made under MS Windows.

Upstream devs have rejected similar patches twice before. I will consult with the other devs about eliminating it altogether.

Related:
http://www.info-zip.org/board/board.pl?v-print/m-1248086794/
http://www.info-zip.org/board/board.pl?m-1248086794/
http://www.info-zip.org/board/board.pl?v-print/m-1236162051/
https://bugs.launchpad.net/debian/+source/unzip/+bug/10979
Comment by Thayer Williams (thayer) - Wednesday, 17 March 2010, 15:39 GMT
I've re-opened this ticket because apparently 7z doesn't work for all 7-bit language encodings.

Attached is a test zip file using shift-jis encoding. This encoding fails with bsdcpio, 7z and (unpatched) unzip. Example output follows, the last of which is the patched version of unzip:

-7z: ?V?K?e?L?X?g ?h?L???????g.txt
-bsdcpio: ?V?K?e?L?X?g ?h?L???????g.txt
-unzip: РVЛKГeГLГXГg ГhГLГЕГБГУГg.txt
-unzip -O shift-jis: 新規テキスト ドキュメント.txt

After researching this for some time it appears that no BSD/Linux ZIP utility fully supports non-UTF-8 filename extraction. This appears to be an ongoing issue with Gentoo and Ubuntu (maybe others too).

So it looks like we have a few options:

a) Re-apply the patch for now, breaking zsh completion and knowing that it may fail again with the next update
b) Throw a patched version of unzip in the AUR
c) Leave things as they are, knowing that non-English win32 zip files will never be fully supported by Linux

I'm leaning towards b or c, if only because none of the upstream developers seem to care. I don't have the skills to maintain this patch should it fail again, but if someone else wants to maintain the package I'd be fine with that too.

Suggestions?
Comment by Alexander Mityunin (xandry) - Thursday, 06 May 2010, 20:38 GMT
At me a similar problem.

$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE=C
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

$ unzip Пикник\ -\ Железные\ мантры.zip
Archive: Пикник - Железные мантры.zip
extracting: ſ���� - �ѽѺ��� ������/ſ���� - �������ٮ ӫ���Կ�.mp3
extracting: ſ���� - �ѽѺ��� ������/ſ���� - ⿻������.mp3

unzip 0.6-5 from extra repository. For correctly unpack files from zip i'm using wine and 7zip (for Windows).
Comment by Alexander Mityunin (xandry) - Thursday, 24 June 2010, 14:02 GMT
http://repos.archlinux.org/wsvn/packages/unzip/repos/extra-x86_64/unzip60-alt-iconv-utf8.patch
File not found: revision 83953, path '/unzip/repos/extra-x86_64/unzip60-alt-iconv-utf8.patch'

Work link:
http://dl4.gettyfile.ru:8080/56/557037/unzip-6.0-iconv.patch

I have checked up - this patch works.
Comment by Roman Kyrylych (Romashka) - Thursday, 24 June 2010, 17:38 GMT
To avoid discussing the same thing in two reports
please use this report only for suggestions how to fix zsh completion with patched unzip,
please use  FS#18691  for anything else related to unzip patch.

The URL you posted doesn't work for me.
Can you please attach the patch to  FS#18691 ?
Comment by Alexander Mityunin (xandry) - Thursday, 24 June 2010, 20:01 GMT
Oh, thanks. Patch attached to http://bugs.archlinux.org/task/18691.

Loading...