Date: Fri, 26 May 2023 14:30:44 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271657] unzip doesn't know infozip (beta)'s -O and -I options Message-ID: <bug-271657-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271657 Bug ID: 271657 Summary: unzip doesn't know infozip (beta)'s -O and -I options Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: arthur200126@gmail.com Info-ZIP's release engineering has stalled, but they have managed to tag a = beta with the unzip-iconv patch integrated.[1] Unzip 6.10b[2] introduces: [1]: https://en.wikipedia.org/wiki/Info-ZIP#Official_betas [2]: https://sourceforge.net/projects/infozip/files/unreleased%20Betas/UnZip%20b= etas/ " \"New\" options -I and -O (from a patch that has been out there awhile= )", " are used on UNIX to set the ISO and OEM code pages used for conversion= s.", [...] " -I [UNIX] ISO code page to use.", " -O [UNIX] OEM code page to use.", Now as unheard-of as Info-UnZIP 6.10b is, the two options have actually bee= n in use for a long time via unzip-iconv and Debian.[3] Any East Asian person w= ill probably point you to that fork of info-zip unzip to properly extra a Windo= ws ZIP file. [3]: https://github.com/emergy/unzip/blob/master/debian/patches/04-unzip60-alt-i= conv-utf8 Implementation-wise, libarchive has an encoding conversion function for ZIP files: just use archive_read_set_options() to set hdrencoding. There's some very weird logic to decide whether to use -I or -O depending on the zip's originating system, but I would just advice you to ignore it. There's also some logic to set defaults for these switches, but why even bother. PS: Unzip 6.10b has a rewritten argument parser with long options. That's v= ery new and seldom used, so let's not worry about it. It does make reading the = code a lot less torturous -- hats off to that. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271657-227>