From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 Date: Wed, 16 Aug 2023 15:38:27 +0300 Message-ID: <83h6oz88n0.fsf@gnu.org> References: <83sf8ka6b2.fsf@gnu.org> <83bkf89x7o.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22832"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65305@debbugs.gnu.org To: awrhygty@outlook.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 16 14:39:50 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qWFoT-0005lL-Ew for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Aug 2023 14:39:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWFnm-0004tf-SC; Wed, 16 Aug 2023 08:39:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWFnj-0004oa-Br for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 08:39:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qWFnj-0001j3-0z for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 08:39:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWFni-0000eE-Hn for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2023 08:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Aug 2023 12:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65305 X-GNU-PR-Package: emacs Original-Received: via spool by 65305-submit@debbugs.gnu.org id=B65305.16921895142434 (code B ref 65305); Wed, 16 Aug 2023 12:39:02 +0000 Original-Received: (at 65305) by debbugs.gnu.org; 16 Aug 2023 12:38:34 +0000 Original-Received: from localhost ([127.0.0.1]:39492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWFnG-0000dC-DO for submit@debbugs.gnu.org; Wed, 16 Aug 2023 08:38:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWFnE-0000cp-IL for 65305@debbugs.gnu.org; Wed, 16 Aug 2023 08:38:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qWFn5-0001gG-FC; Wed, 16 Aug 2023 08:38:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KKbKruO6UU52GmfyhlCIGpPNdT4IL6GlbxKN70UlZPw=; b=YwqGoEV/nd2b hm3hu12oAxb/V3KteSL2/4ga3KPmvNHiu9bYOzjAWPYlpWBI5eZzy3HJJlB4hEDjcCc7rjwAZRcuN kNeEfTXrYTpD56mJNgnuZT/1agH+ywF/C7NbMK0H2PZajk+W+kRBh+kK+bhAqIwrtsnrv1tYOgwV6 ade5drn/VJoUrW/AYYRiTQExbpFCNRSfKlmc09logL2fLRiZ8Y62DBApFcfxd9AyqNIggOlw6jtLE eIY/FctVbgQdgdCqZPoaS1Sq0m/yxPdAPFTEZYfS9fAqG9ndIIG4/ILum6EDHJv6EZKXtOfVK1uuw LUXqpTfui8V2ZhP/fVlrkA==; In-Reply-To: (awrhygty@outlook.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:267579 Archived-At: > From: awrhygty@outlook.com > Cc: 65305@debbugs.gnu.org > Date: Wed, 16 Aug 2023 12:47:14 +0900 > > Eli Zaretskii writes: > > >> There is a bit flag indicating that the subfile name is encoded with > >> utf-8. Bytes 6-7 in local file header or bytes 8-9 in central directory > >> header are general purpose bit flag. And bit 11 of the flag represents > >> file encoding flag(1 for utf-8 encoding). > > > > Thanks, please try the patch below. If it gives good results, I will > > install it. > > The patch works to list entries, and the contents can be extracted with > 7z.exe. unzip.exe does not work well. Thanks, I installed the patch on the emacs-29 branch. I'm not surprised that unzip.exe cannot extract such files, and I think it works for you with 7z.exe by sheer luck: Windows transparently converts non-ASCII characters to the system codepage when it invokes programs via the "narrow" APIs, so it could mangle the UTF-8 encoded file name into something unrecognizable. > I tried the settings below, but rewriting entries does not work. > (archive-zip-* variables' values are default if archive-7z-program is set > and zip.exe/unzip.exe are non-existent) > > (setq archive-7z-program "c:/Program Files/7-Zip/7z.exe" > archive-zip-extract '("c:/Program Files/7-Zip/7z.exe" "x" "-so") > archive-zip-expunge '("c:/Program Files/7-Zip/7z.exe" "d") > archive-zip-update '("c:/Program Files/7-Zip/7z.exe" "u") > archive-zip-update-case archive-zip-update) > > It is because update command needs "-si" option followed by an entry > name. It should be one argument like (format "-si%s" name). Sorry, I don't understand: is this the same problem, or is this an additional problem? For example, does rewriting entries work with ASCII file names? If this is a separate problem, I prefer that you submit a separate bug report with all the pertinent details. Thanks.