FS#56428 - [unzip] add the -DUSE_ICONV_MAPPING flag
Attached to Project:
Arch Linux
Opened by Hector Martin (marcan) - Friday, 24 November 2017, 08:40 GMT
Last edited by Jonas Witschel (diabonas) - Wednesday, 03 November 2021, 14:06 GMT
Opened by Hector Martin (marcan) - Friday, 24 November 2017, 08:40 GMT
Last edited by Jonas Witschel (diabonas) - Wednesday, 03 November 2021, 14:06 GMT
|
Details
Description:
Please add the -DUSE_ICONV_MAPPING build flag. This flag enables the -I and -O options to convert non-UTF8 zip files to/from the native encoding. Without it, there's no way to extract e.g. zip files created on Windows machines with Japanese locale which are SJIS encoded (and typically do not have utf-8 extended filenames), as all the filenames end up irreparably mangled (not even convmv can fix them). Note that the flag uses libc's iconv, so it does not introduce a dependency on libiconv. Additional info: * package version(s): unzip-6.0-12 Steps to reproduce: $ unzip -l 沙音ほむ_1.0.zip Archive: 沙音ほむ_1.0.zip Length Date Time Name --------- ---------- ----- ---- 0 2013-11-24 16:57 �����+��_1.0/ 590216 2013-11-24 14:42 �����+��_1.0/�����+��.htsvoice 2742 2013-11-24 16:54 �����+��_1.0/���+���f�����p�K��.txt --------- ------- 592958 3 files Results in completely corrupted filenames (they aren't even the original SJIS byte sequences and cannot be repaired). With the above build option you can instead do: $ ~/bin/unzip -l -O sjis 沙音ほむ_1.0.zip Archive: 沙音ほむ_1.0.zip Length Date Time Name --------- ---------- ----- ---- 0 11-24-2013 16:57 沙音ほむ_1.0/ 590216 11-24-2013 14:42 沙音ほむ_1.0/沙音ほむ.htsvoice 2742 11-24-2013 16:54 沙音ほむ_1.0/音響モデル利用規約.txt --------- ------- 592958 3 files This converts to the native UTF-8 encoding and extracts correctly. |
This task depends upon
Closed by Jonas Witschel (diabonas)
Wednesday, 03 November 2021, 14:06 GMT
Reason for closing: Fixed
Additional comments about closing: unzip 6.0-15 in [testing]
Wednesday, 03 November 2021, 14:06 GMT
Reason for closing: Fixed
Additional comments about closing: unzip 6.0-15 in [testing]
Comment by oech3 (oech3) - Tuesday,
30 March 2021, 18:03 GMT
Comment by
Jonas Witschel (diabonas) -
Wednesday, 03 November 2021, 14:06 GMT
It requires version 6.10b.
I believe this should be fixed in unzip 6.0-15, currently in
[testing], by applying
https://src.fedoraproject.org/rpms/unzip/raw/rawhide/f/unzip-6.0-alt-iconv-utf8.patch
and
https://src.fedoraproject.org/rpms/unzip/raw/rawhide/f/unzip-6.0-alt-iconv-utf8-print.patch
Feel free to request this bug to be reopened if this is not the
case.