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
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
|
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
Sunday, 06 March 2011, 00:53 GMT
Reason for closing: Duplicate
Additional comments about closing:
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
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?
$ 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).
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.
please use this report only for suggestions how to fix zsh completion with patched unzip,
please use
FS#18691for anything else related to unzip patch.The URL you posted doesn't work for me.
Can you please attach the patch to
FS#18691?