From unknown Sun Jun 22 00:52:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 Resent-From: awrhygty@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Aug 2023 04:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 65305@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.169207389522211 (code B ref -1); Tue, 15 Aug 2023 04:32:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Aug 2023 04:31:35 +0000 Received: from localhost ([127.0.0.1]:34839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVliR-0005mA-5e for submit@debbugs.gnu.org; Tue, 15 Aug 2023 00:31:35 -0400 Received: from lists.gnu.org ([2001:470:142::17]:42664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVliO-0005lv-AZ for submit@debbugs.gnu.org; Tue, 15 Aug 2023 00:31:32 -0400 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 1qVliH-0006ab-1n for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 00:31:25 -0400 Received: from mail-psaapc01olkn2055.outbound.protection.outlook.com ([40.92.52.55] helo=APC01-PSA-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVliE-0004g9-T1 for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 00:31:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oyw+r9Fcq4dAivyJrryJmEbiuEh7Y1Kh5tz1zuRU+b640oaQBLFxvqKJAx5B+Rv2B5WFIPq5Ehjl24+HsQJf4xCrafABbYCE9xdcfwbbrC3s+sBVpqad66eJkjWGF/oDU2t2bMAuLVF61Z2YWAdl5aYsrxJgrkUUkZd4+6/DI+mmQw9orDPuhjNAvym51pabHHbNLkRydtDOMO58o8AGKvGX5YNV9+bkDDZDUqLpI5HGj2TuQoJUC4EOIxdzGTb8zeF5dYPrnOL/DA+BGNAjMH0AWKCQnEhxtQtxmXCGbTwI/W4KFaIH5OZ9Siu4TPJS+vP9w2eJxKzlO6YDBI3yRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Hb7qNPcbuochCD/63rmln3R65hOsQg53VC5MkRWzBCk=; b=RS8xq9kBug0P/Pf/ADCPaALZlxdiq4c6/Vyo3JOhhKH/ZDaOL49TZCI/rK+rgq/I1YNvMzHin4e23n1HW4Qi/2EQlF990w8DdZrYVkTY3B8RjeRuL2O/hZQBoEjFwB8dFi5Q6bvDGGRTErynXF7Lvl2DdE3gWQ/ynPlbw+4fFAcHcyui//PM/XMbMJhXhr+XiBJNTAbIZW5WfR2rBQ0tBrd9N1f1rBqEThR3PXvhpBQ3ORT2Adp5X067CaAj4MMzrhxNgITfgAAtxeHp4iW4mQwW6uwo5rfOlbMz3hcgHCezBcL7vZw/FmarYfpp5uxbLBpmP17wSzpXbXOc84I4gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hb7qNPcbuochCD/63rmln3R65hOsQg53VC5MkRWzBCk=; b=f5E2DaNqgPm50w5RnjZU9Bb/vSBpc6JMeT0rqVixvLPmbG7YJofAgEyue1/dlIZdQgFFcSnqGDBJgR0hvKkHaVtMGNDbs5NTqh/U6GzG9xfVcgEKs68Xa6rSOM4kW3AyWSRXC5utATz+7VCrK31lZs0Kuj2/qp7Xtb5DON5l/uf9ZJxGnjgDXM0TNct0CcrkjOmoA3rvwA8Lxy+4Ed78MG5miH6Dw96Zb2PmESjdnXS7eq9/dIxfGh2H4FTMjkSxaAZ2SLLA/R9hGiBgr6FybYwDNKPBUUWu+1SyGPKCmOPjPOs75iRMfnfXm7xmU4xugk6Ny0Gfnm2rV/5iViUM/A== Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) by SEYPR01MB4152.apcprd01.prod.exchangelabs.com (2603:1096:101:54::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Tue, 15 Aug 2023 04:31:18 +0000 Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133]) by TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133%4]) with mapi id 15.20.6678.022; Tue, 15 Aug 2023 04:31:18 +0000 From: awrhygty@outlook.com Date: Tue, 15 Aug 2023 13:31:16 +0900 Message-ID: Content-Type: text/plain; charset=iso-2022-jp X-TMN: [KwETN3MlrZY6adgiQSLiCyRLLEf/Hxpe] X-ClientProxiedBy: OS7PR01CA0101.jpnprd01.prod.outlook.com (2603:1096:604:256::20) To TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) X-Microsoft-Original-Message-ID: <86wmxx2agb.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR01MB3920:EE_|SEYPR01MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: 78637f30-24cf-4881-6bd5-08db9d487811 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FSU2ZQPYLZfXNtZ61kBZwBJzgNc3s+m0E2QDryGQQTIpzUZ67rNVNVCdQDJ2Rz9VwBLcq88MsNQ3BioHjUfed2kfaiO7HMTrk/fyFWYQxnjmfNSzOnNkOtAv8jXhh9UayOPys2Wq02dyBCe/m8KUfz1Kr3q5kB9DJ2ny1dqfRWqvZtDH5CMlQ3S4Q2CbHicHGYViAyXgTsBI2VR9Q9FTqEFXBbY8iBwaqgl1oK9ismA7y45oX5f27AhTvqf8w71a55iI+lYvs0J0cHb3ywd3MMg9/Kpv2ZFeWVdUY7tq0+umSfPXTFl0/9MRBodBs8u3xXfcRpo2erEpk6XJv8HiGHr4VxJ7UBHzDZqSzQY312kcep9K6dFYPCHj2f/lhpKJdjfgE2JL7R5xn7LT09A8elY5ustSd0FGXCmgh9Lh+VYhKFA7jc7LCy88xj5uMHthMNstB9JU4XwUrmcWabr43R5mZzRQe8d0XoYjKoJiroVU6JWdTmUr+D2koYtQH2+fNC9SvlVB5OCiLeVTge49k3IqLW1PB5fqhFV7viV7ec1rQaId1/mdBiAS3gQ5vtN0 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uP+mP/psnQh3k1953laXPXg0oNlLwO76mAsWzJ2e7yULhC9cyHlSTU7KdXyuWPEunf6mY89o/tTN3mqS+doXjJLdWYWujLDHcab09grAPqajl+fPxqeUDpIOdSmPFFqZEtXq6MrvF8kE0IKt3Cm1ufSl3dS69/OYqIvYlv2Rvz/oIz9UfsKZovlshB+E2aWf9wzYooBnPZT+x+7LdnLIABp8mUcEctsFrKMtAqd+qHZdFRbOm/mrTSBy557UI5byDaWX4x84rg7TgCw3yTYh3gIX9DEZBEU4L5s1Gdof5pfzJqfAHgM+pPHPbTOSjqBuif5FLOy7s03jYZbgJC+i1LviYSHtdwwnE0NedmkJ/1zLOaqqFyO2fQFskYgnvKDRk8b1ODNySnotq9yH7mcDMsbuQgJf7VLyhltUKKfwyM3k3Q63d9bjNUJWh8BuHggI9IEMIVp381BDPO6dCa6MQuIoCFwtRNz+GrWdxb4OrPbkmX8ck6VKCS3aoMA2QUcCjfN3VJOXGey0jBnyPxLF32s+IuGRY3XLRXLdzkUe0A6WIuHHDNkUUWc/pc+Y2cm8RI3bnl8ZbU9NfNVZJClN6fEcu0wz06R9f6n3caJHvUV9poA9yctygqlCRYVgASj3wEux3H8mwrHfNN3mCbsjmZ8LHFKyrSNS4LZY/MhjIhLAuq04qp0GlU2OSs7/yDsU8wMbs8RZfsAamgAT/vG8Q5mmQDkHZqeJBDpEYbR5y0/hCRaVU4MYG0nuReR7tNZ+EAX9ZE0Y3WJlIthEb3pfp92f6oOkKJVhqg0Zj+3p5z3Tr27PHjc7btaMQfkKyJMsbqAKJhaXBWh4K6ql1MYJCzsc4rAS54biPXnIAz413YFgoSuZrnxwQbqtiPb9mHW7Z3IR/g2uIKai9kq5IhL4LBJ5IOEpIaf/e/bg8iXMsAXGu9ZjMy6NSV10YvRB14jQ4Mkac/alpHJ58QgpKDMKKEMhT2gYkxih/jR3GqE3wMu6/3PJr1j6ZiCOcmThHNiP0RTvmhXRw/7owtBkzPNOMiibk8i3mSIZ5UG9gq9Fh0bpWlWZ0Zg1Z9PR1kOz24SlGAsAzHS56AQ8OWw99fO3cnhTAL2Th6SQjFBueJo+4ZwinMPNLbtQEprLA2RkY7QG2toW/EyyZCqhNkV30KTVk8aJIFEPe5jT1DFfZL0c2vuxEWeytV+SMauMar4yBx9lzLNW8tSnxcMh2k96ChzehA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78637f30-24cf-4881-6bd5-08db9d487811 X-MS-Exchange-CrossTenant-AuthSource: TYZPR01MB3920.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 04:31:18.2510 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR01MB4152 Received-SPF: pass client-ip=40.92.52.55; envelope-from=awrhygty@outlook.com; helo=APC01-PSA-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) With python 3.10, ZIP archive can be created with: python -m zipfile -c ARCHIVE.zip subfile If the subfile name contains non-ASCII characters, they are encoded with utf-8 in anyway. Such subfile names are decoded with local language encoding(cp932 for Japanese Windows OS) in archive-mode. For example, archive 一.txt in test.zip with python: python -m zipfile -c test.zip 一.txt The subfile name is shown as 荳\200.txt in archive-mode buffer and the entry can not be extracted. In GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02 built on AVALON Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.3324) Configured using: 'configure --with-modules --without-dbus --with-native-compilation=aot --without-compress-install --with-tree-sitter CFLAGS=-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB (NATIVE_COMP present but libgccjit not available) Important settings: value of $LANG: JPN locale-coding-system: cp932 Major mode: Dired Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (wdired qp files-x shell pcomplete comint ansi-osc ansi-color ring dired-aux image-mode exif arc-mode archive-mode pp shadow emacsbug help-mode gnutls network-stream nsm mailalias smtpmail textsec uni-scripts url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source eieio eieio-core cl-macs json map byte-opt gv bytecomp byte-compile url-vars idna-mapping ucs-normalize uni-confusable textsec-check sort cl-seq misearch multi-isearch mail-extr message sendmail mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader cl-loaddefs cl-lib term/bobcat japan-util rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 239724 23153) (symbols 48 8782 7) (strings 32 40794 3846) (string-bytes 1 887485) (vectors 16 45221) (vector-slots 8 1276135 125856) (floats 8 105 354) (intervals 56 1746 0) (buffers 984 17)) From unknown Sun Jun 22 00:52:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Aug 2023 11:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: awrhygty@outlook.com Cc: 65305@debbugs.gnu.org Received: via spool by 65305-submit@debbugs.gnu.org id=B65305.169209922322400 (code B ref 65305); Tue, 15 Aug 2023 11:34:01 +0000 Received: (at 65305) by debbugs.gnu.org; 15 Aug 2023 11:33:43 +0000 Received: from localhost ([127.0.0.1]:35098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVsIx-0005pE-1O for submit@debbugs.gnu.org; Tue, 15 Aug 2023 07:33:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVsIu-0005p0-6n for 65305@debbugs.gnu.org; Tue, 15 Aug 2023 07:33:41 -0400 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 1qVsIo-0005sF-F7; Tue, 15 Aug 2023 07:33:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=UKUAqeH3+xhx3ccpYxIgRQPl8jkvfmE/E5n2uZM9T2c=; b=fJxHqT8awt6xuMtVvZqG 9aoMKgfkLmY937OB24LAkfbdMp/kUxRdJljv2MjbrV0G0VGZl+O6vI5UWfoLNmG7zKSFH8fdBX4R9 BMAVfjmK637LoYWnodD3Q09uYyQdONsjsRHJ2qbyqHkNQVJTLiw1KIbLgISCZ3YvfOhCIkr51N7i5 kfGl5SFSqHtRuE6b2sG2UQ4oSS60zBLUG+W0l/TRupwV6I3KUaYM0b4HEFKCegxIj6lH2YxEFwUq8 del49h23CMqDxFuAAUMmgHAijCSnE9jwC2Ko3kDG41zIjQdMm9uuwgrGqaXs+jc7eoabx5VdWfiRl UWN+s7rFoqDLNg==; Date: Tue, 15 Aug 2023 14:33:37 +0300 Message-Id: <83sf8ka6b2.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (awrhygty@outlook.com) References: MIME-version: 1.0 Content-type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: awrhygty@outlook.com > Date: Tue, 15 Aug 2023 13:31:16 +0900 > > > With python 3.10, ZIP archive can be created with: > python -m zipfile -c ARCHIVE.zip subfile > > If the subfile name contains non-ASCII characters, they are encoded with > utf-8 in anyway. Such subfile names are decoded with local language > encoding(cp932 for Japanese Windows OS) in archive-mode. > > For example, archive 一.txt in test.zip with python: > python -m zipfile -c test.zip 一.txt > The subfile name is shown as 荳\200.txt in archive-mode buffer and the > entry can not be extracted. Is there any way of distinguishing these Python-created ZIP archives from ZIP archives created by other Windows programs? Emacs by default assumes that file names in a ZIP archive created by a Windows program are encoded in the console codepage, and it enforces using that encoding for file names when the "creator" of the ZIP archive indicates the archive was created by Windows programs such as InfoZip's zip.exe and the File Explorer. In my testing, zip archives created by Python as above record the "creator" as number 0 (zero), which is identical to what InfoZip does. So, unless someone explains how to distinguish these zip archives from those created by InfoZip, I don't see how can Emacs know whether to use the InfoZip heuristics or the Python heuristics. Without the InfoZip/File Explorer heuristics we have in arc-mode.el today, Emacs on Windows would be completely unable to support non-ASCII file names in ZIP archives. From unknown Sun Jun 22 00:52:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 Resent-From: awrhygty@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Aug 2023 13:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 65305@debbugs.gnu.org Received: via spool by 65305-submit@debbugs.gnu.org id=B65305.169210759524380 (code B ref 65305); Tue, 15 Aug 2023 13:54:01 +0000 Received: (at 65305) by debbugs.gnu.org; 15 Aug 2023 13:53:15 +0000 Received: from localhost ([127.0.0.1]:35252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVuTz-0006LA-Cx for submit@debbugs.gnu.org; Tue, 15 Aug 2023 09:53:15 -0400 Received: from mail-tyzapc01olkn2063.outbound.protection.outlook.com ([40.92.107.63]:45702 helo=APC01-TYZ-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVuTv-0006Kt-7h for 65305@debbugs.gnu.org; Tue, 15 Aug 2023 09:53:13 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JiMiPzVovaWamz6UCefPhH7IBKxqVcNdM/viFgb2jTOLAEDIU9LT7mIGwtGhH6ll7u/JfmrGUd5hVOE1ntaaFRHWsO8IAG9hknbvsqh3CeOruqfrnTftmv/Qs46jyHtwnyyRt/47EneJqjXxy1Fb4Dt44T1z1oMzfQdrPG9KzHJobHLFzLaRlz/VbXDaV3MPbocRgTeWUcKktNniX/V7sHBEdGkrtfQYxrDsaSwAkqdSRzQYXDuY/+xJJYUDkhZaDgrsXJ/uuGS7vhYam3nvfap9oX5JmCH3qiyJZXxkyij4Jo/MGN5y06hCPse/p/XLDqod7AFNrDmFcGQMCU8kCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bBKbzr1LSfiBeNOui7wRNRU1yN+QLjd1ty3Bm25x8GA=; b=IepovPwLq5iRKUuOgF4w8N5jirT4oB5WzANnpRKziV+6h6LSfQZLColUl9o/UOMqw9ArUURsVswRk9iJjE1I1RmnPKENkFHlpnOsiefqNtL6XnGpWvgNPOListo40LXiT++wma10jPGkYIMZFw3ZI+A3dcllkKwfUNmUqUrMLyEdgWfat1fsFNrSkWBlcFr5bpO7Piq7Xh+fQCUAH/y3KX84w6+SOTCrkkjnQkEli9x7FrdQEJGLDJVPnKSyh/XRiWR95qaOMv3wsuU6FdwBk/4xe5jlapT41X69nvEp24kHHDBUjd0PnGelqwqs5v6hL+FTUNT0ai5tuH8PskUWNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bBKbzr1LSfiBeNOui7wRNRU1yN+QLjd1ty3Bm25x8GA=; b=pfs69iR7cbv9n5+lmchfXq4lj4NQILdJQq7Dk/nIXXEY/mo0gLm7FVjf/kdYytUYHulnFGNhtGpdzNv5fsG3TcWlyWHywpiCeaRq58dh3csd/Khsn1oHbzsm9XbZEAAqpR5KVXzi5189ojNu/rKGOw4IxEJ2jqu3uSHsoMFcBnzQMkuYJCE6KnmBsLV1zhSFu9LBXv4Dpppeodj9+yqZQtbZKpHrrm5/+ddL80EXN2oI4royD4wYYugd8rI2iMUdKX3VFUq0sjaSYlSrRpiXFnE3zdU4hgVEKw7yMuQTns+PKRwjTwVA9JMgnXOBxPRPNM3Ji+y/cOpF7H9GT7Umxg== Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) by TYZPR01MB3968.apcprd01.prod.exchangelabs.com (2603:1096:400:3a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Tue, 15 Aug 2023 13:53:03 +0000 Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133]) by TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133%4]) with mapi id 15.20.6678.022; Tue, 15 Aug 2023 13:53:03 +0000 From: awrhygty@outlook.com In-Reply-To: <83sf8ka6b2.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 15 Aug 2023 07:33:35 -0400") References: <83sf8ka6b2.fsf@gnu.org> Date: Tue, 15 Aug 2023 22:53:01 +0900 Message-ID: Content-Type: text/plain; charset=iso-2022-jp X-TMN: [ecHFAa0G+BWKPbpENBXvW9H11zxFf27n] X-ClientProxiedBy: OS0P286CA0138.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:16b::17) To TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) X-Microsoft-Original-Message-ID: <86o7j8v2de.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR01MB3920:EE_|TYZPR01MB3968:EE_ X-MS-Office365-Filtering-Correlation-Id: f526d46f-2ced-4a68-a472-08db9d96f211 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6eGN0xe6BfA32oSfXAR04CCwpxyUruS0UMLRopcJkboiWJjFF0VOXGeKMPRhvDLIyPEs5GHebg4MRLOspbzg39Wk3CSHx12iPYwpgTfZq5GdmAbDvVfxMAUISGvjQDztWBuSwPhX4mYpxniL5+deK7fBGaPC5tDhnnrzH+OxMdEOUOYtLq4rKNftUPaFWSm8zDbzT8poS/a9X025hpHjGXoDliiHW9PWHT3VFFVaLlabnYgHOdZ74NQFrwnLBRG0+JbefFD1fSEiboQMkySRYw4I0m8jYp+SUlAXz9RwuTFdXtCrtwvItruRg+d4P4mkqYkNX4MDTLMeZrqul300H2Uxv7sIdnYOW9lssKZ0s/9AzcIb34qagdYYsV/zhfBZoeD8Kv3juYAuhGiZkasBd2fIIcmseqQUD2xVFQf40eMxmLjbWdjgMFJWhrq/moS8dUElMWOQ7vjwf3EZe5ALX72dplI40z+1uNpOG4JDdYDnqn1vm+HMDXU2HxPh95/AkRG3hRi4tkngFZPcJxZrUC5IypnCOqpEdIKmc8hPB9yKlgALXWsnUHvJkBbpN9ou X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: DbrXp2cRdkxLgxrhOPnAwwhraUcEWCZ84DXz2ept7HBhGuSLf23JXJfUfuiPbEJ6BzpmIr2cIQU2RIQLEMTo4B3ug9LL3/rP0Unm5WiraQB73wJpHA+S3o5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qBrjmbMdPb8i020sNE2G8GS8BaCVeyYIivUQyyYRCNJ/ngw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f526d46f-2ced-4a68-a472-08db9d96f211 X-MS-Exchange-CrossTenant-AuthSource: TYZPR01MB3920.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 13:53:03.6785 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR01MB3968 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: awrhygty@outlook.com >> Date: Tue, 15 Aug 2023 13:31:16 +0900 >> >> >> With python 3.10, ZIP archive can be created with: >> python -m zipfile -c ARCHIVE.zip subfile >> >> If the subfile name contains non-ASCII characters, they are encoded with >> utf-8 in anyway. Such subfile names are decoded with local language >> encoding(cp932 for Japanese Windows OS) in archive-mode. >> >> For example, archive 一.txt in test.zip with python: >> python -m zipfile -c test.zip 一.txt >> The subfile name is shown as 荳\200.txt in archive-mode buffer and the >> entry can not be extracted. > > Is there any way of distinguishing these Python-created ZIP archives > from ZIP archives created by other Windows programs? > > Emacs by default assumes that file names in a ZIP archive created by a > Windows program are encoded in the console codepage, and it enforces > using that encoding for file names when the "creator" of the ZIP > archive indicates the archive was created by Windows programs such as > InfoZip's zip.exe and the File Explorer. In my testing, zip archives > created by Python as above record the "creator" as number 0 (zero), > which is identical to what InfoZip does. So, unless someone explains > how to distinguish these zip archives from those created by InfoZip, I > don't see how can Emacs know whether to use the InfoZip heuristics or > the Python heuristics. Without the InfoZip/File Explorer heuristics > we have in arc-mode.el today, Emacs on Windows would be completely > unable to support non-ASCII file names in ZIP archives. 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). I guess unzip.exe does not support utf-8 encoded subfile name. Writing batch file with utf-8 encoding: c:\Emacs\emacs-29.1\bin\unzip.exe test.zip 一.txt and run with chcp 932, 荳\200.txt is extracted. With chcp 65001, extraction failed. Writing batch file with cp932 encoding:(same as above) c:\Emacs\emacs-29.1\bin\unzip.exe test.zip 一.txt and run with chcp 65001, 荳\200.txt is extracted. With chcp 932, extraction failed. This is not an ideal behavior, but extraction to STDOUT may work. To the contrary, 7z.exe extracts 一.txt correctly. If batch file is encoded with utf-8, it works with chcp 65001. If batch file is encoded with cp932, it works with chcp 932. From unknown Sun Jun 22 00:52:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Aug 2023 14:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: awrhygty@outlook.com Cc: 65305@debbugs.gnu.org Received: via spool by 65305-submit@debbugs.gnu.org id=B65305.169211101131533 (code B ref 65305); Tue, 15 Aug 2023 14:51:02 +0000 Received: (at 65305) by debbugs.gnu.org; 15 Aug 2023 14:50:11 +0000 Received: from localhost ([127.0.0.1]:36444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVvN5-0008CX-FP for submit@debbugs.gnu.org; Tue, 15 Aug 2023 10:50:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVvN0-0008By-Tx for 65305@debbugs.gnu.org; Tue, 15 Aug 2023 10:50:09 -0400 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 1qVvMv-0005jd-4b; Tue, 15 Aug 2023 10:50:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=BOR48TN+6O3Ch68NTo8BxYNPI6jkZS26Hah0cJUn/jQ=; b=YzOn5JoQfl119fCwZbaU 6/ykTeE6nno60JiV7oz1CsCQ3H9aRljcgOxsk7jgKDyQG0wcAP6VYRYFxjyzendamZO8RLkLDXg0e DuOTVb4VvP/2YyiTCUK4bM8j5TDoRSiA49NX4VR0OOzC6mxXhcZyOlV3qL8NjRuiH+lV4c4Ios/4r O1x7lWNv+3v4kUXBZWHLM3Lgh9Z6zNT7HVycbjJB+wUZWkBzwUOjHlGsEyk6o8DxHwADq3MBmLemM 6mQxBww1bZomCFVEOYkT6JZZVEoev2AEH1hVmMucyo8KmVc+xUIzl+WMCA6a0wDcmReKbBQaXN1po 4YKI2wv9qR92Pg==; Date: Tue, 15 Aug 2023 17:50:03 +0300 Message-Id: <83bkf89x7o.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (awrhygty@outlook.com) References: <83sf8ka6b2.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: awrhygty@outlook.com > Cc: 65305@debbugs.gnu.org > Date: Tue, 15 Aug 2023 22:53:01 +0900 > > Eli Zaretskii writes: > > > Is there any way of distinguishing these Python-created ZIP archives > > from ZIP archives created by other Windows programs? > > > > Emacs by default assumes that file names in a ZIP archive created by a > > Windows program are encoded in the console codepage, and it enforces > > using that encoding for file names when the "creator" of the ZIP > > archive indicates the archive was created by Windows programs such as > > InfoZip's zip.exe and the File Explorer. In my testing, zip archives > > created by Python as above record the "creator" as number 0 (zero), > > which is identical to what InfoZip does. So, unless someone explains > > how to distinguish these zip archives from those created by InfoZip, I > > don't see how can Emacs know whether to use the InfoZip heuristics or > > the Python heuristics. Without the InfoZip/File Explorer heuristics > > we have in arc-mode.el today, Emacs on Windows would be completely > > unable to support non-ASCII file names in ZIP archives. > > 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. > I guess unzip.exe does not support utf-8 encoded subfile name. > Writing batch file with utf-8 encoding: > c:\Emacs\emacs-29.1\bin\unzip.exe test.zip 一.txt > and run with chcp 932, 荳\200.txt is extracted. > With chcp 65001, extraction failed. > > Writing batch file with cp932 encoding:(same as above) > c:\Emacs\emacs-29.1\bin\unzip.exe test.zip 一.txt > and run with chcp 65001, 荳\200.txt is extracted. > With chcp 932, extraction failed. > This is not an ideal behavior, but extraction to STDOUT may work. > > To the contrary, 7z.exe extracts 一.txt correctly. > If batch file is encoded with utf-8, it works with chcp 65001. > If batch file is encoded with cp932, it works with chcp 932. Like I said: support for UTF-8 encoded file names on Windows is sporadic and incomplete. It will remain so until Windows file-related APIs support UTF-8 encoded file names. diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 5e696c0..05a71fb 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -1990,6 +1990,7 @@ archive-zip-summarize (setq p (+ p (point-min))) (while (string= "PK\001\002" (buffer-substring p (+ p 4))) (let* ((creator (get-byte (+ p 5))) + (gpflags (archive-l-e (+ p 8) 2)) ;; (method (archive-l-e (+ p 10) 2)) (modtime (archive-l-e (+ p 12) 2)) (moddate (archive-l-e (+ p 14) 2)) @@ -2001,7 +2002,12 @@ archive-zip-summarize (efnname (let ((str (buffer-substring (+ p 46) (+ p 46 fnlen)))) (decode-coding-string str - (or (if (and w32-fname-encoding + ;; Bit 11 of general purpose bit flags (bytes + ;; 8-9) of Central Directory: 1 means UTF-8 + ;; encoded file names. + (or (if (/= 0 (logand gpflags #x0800)) + 'utf-8-unix) + (if (and w32-fname-encoding (memq creator ;; This should be just 10 and ;; 14, but InfoZip uses 0 and From unknown Sun Jun 22 00:52:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 Resent-From: awrhygty@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Aug 2023 03:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 65305@debbugs.gnu.org Received: via spool by 65305-submit@debbugs.gnu.org id=B65305.169215765120047 (code B ref 65305); Wed, 16 Aug 2023 03:48:02 +0000 Received: (at 65305) by debbugs.gnu.org; 16 Aug 2023 03:47:31 +0000 Received: from localhost ([127.0.0.1]:38540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW7VK-0005DH-Id for submit@debbugs.gnu.org; Tue, 15 Aug 2023 23:47:31 -0400 Received: from mail-sgaapc01olkn2015.outbound.protection.outlook.com ([40.92.53.15]:7521 helo=APC01-SG2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qW7VF-0005Cz-60 for 65305@debbugs.gnu.org; Tue, 15 Aug 2023 23:47:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Iif1FIpAI585q0wUTQEgfTMqputuakCn03vIx9hZxMTXRAREv4xlT15lw/6X3snZ/z4a3AYaF0Z1kOnRY/ljCnYGJuEVEQxqaXOEN73cjvohMu72PCSPvFKQgt6XXGJFXR8kSLpwtVSSv99VD9CBnM8foyIO8gTx66NCbt7V82fSZDDd3Gw5QVmog7QE+IpG5D9VdrDMG11hFOezAg2fvU7kSs1t/Th1P4Ujnp4hnpC0A735DWgyhtS5myb8kTNkO34Xinpt1AgWiY4/hBh2B6PHiqlt+MAkeojeYr+1DG9dBexqnv1hQPvuXSYgxMi1Tgb0OFl/gIrdCQ1b4TCTVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pwpYQP+IORUx6LfGV6+7fgvlzmeItAdlSkqZqFQBQJI=; b=FSkc1o9St3SnjKuAeVa3gm6duvFzdtnQ2wNUGc0uxeTL7O2INi7pPVINs2LcihU0FpvYxPgUBmoKlfI844fj8m+UWsXlo71c3gzztatbxX3ENVYzMAs/xMUu5m55koqmMxx6zGK21fO+fiaiBnHeW+Y89yrhRIXGOFyMJUAKuPIwDH9N3MlBxojbb3b11yGrsQOKOlBvui6n3adFf7f57bc3sEfbuFD/LHjneBg6C8F9j69HsEZqOFMwJ2opW5iy33CmlnA1jAN4jYQj1LPN9vELqAMsnaKpqpETg8eHhtGEBpSmE6izEl7qrbS7J/WLRBPo166nnoyz4mHSBs6Vvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pwpYQP+IORUx6LfGV6+7fgvlzmeItAdlSkqZqFQBQJI=; b=CogzAlT7CBXFH6Kf+HrxuyyBSscYOFzJOJqSNeLlE2W3gbPDcNExbYD3QKPpDHpglqDMI8CZnm5Kd+SiNyLf45OHBS7C0MME85xu0Gu1k47zmlqV7bkhJxEgminuXgmSDi+oxlZNeMumHuzUNL2GDFxO+Un4DND/bECI79shcKEfwdR63nJupnyqWZwshayfcsnAhxCQ5bp6e4cj5hABQ3cdCLXJ08F+P6i6GbZnBjVoIvHj5t82kz5v1Vq77Zuu5eyE19xw1OFkT2hvZ8l8Wnn+oliI9CddroQGzY1aglu3XcW1Y+frn4q9dOZnZ1ytiGCWxp0mM9kXAFF5fIpx+w== Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) by SEZPR01MB5462.apcprd01.prod.exchangelabs.com (2603:1096:101:133::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Wed, 16 Aug 2023 03:47:17 +0000 Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133]) by TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133%4]) with mapi id 15.20.6678.022; Wed, 16 Aug 2023 03:47:17 +0000 From: awrhygty@outlook.com In-Reply-To: <83bkf89x7o.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 15 Aug 2023 10:50:01 -0400") References: <83sf8ka6b2.fsf@gnu.org> <83bkf89x7o.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Wed, 16 Aug 2023 12:47:14 +0900 Message-ID: Content-Type: text/plain; charset=iso-2022-jp X-TMN: [/05hXKFl8pFPnE3SVGlrihdqflRyPRPQ] X-ClientProxiedBy: OS3P301CA0014.JPNP301.PROD.OUTLOOK.COM (2603:1096:604:21d::20) To TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) X-Microsoft-Original-Message-ID: <86bkf7vebh.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR01MB3920:EE_|SEZPR01MB5462:EE_ X-MS-Office365-Filtering-Correlation-Id: 89a5e032-3cc8-4a98-1668-08db9e0b7c26 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FW+0epceInvIp843YfuneMsOn/sOS9030Ml8cB6NpmAKLPR4aSZkjCllju8sc2/iDVDKUeSATG/nB//tPioimmAN8/xQG5LOu8RdFlafxas9j1OkCq/B51+QVBivJHFBnOuaC7WPLu8FLJJgMH8Yc0zCPVVsqH5wezbOCyvz5GMzFYnMerzS8K/GUWx7nP0yPh95vyRZn/eUQemA53Kyqjef3C3OtJKlYov2blsn0Fs7dl0e6ozEyJC4bb6h//PMBi++ZKQn42DMTK0U/XjRHOnE6C8Sl8lY1PVLfAfQrWSEzzc5xB19jAKbrgNeDbSyQWlGrj9P/53Q4FC2oXcftdgeTTgpbcEmpM0LowkRAkKWMkr/q+OJWKuGkOXpMuaroin8HvZFeocDsYypYrnSmzt9dSRkwbk0Em8noWzM2zLdsHiXDX3tviqsjFG3XOhnxU7MUhc58ag/DMuG4BL5N1jiRdyO92N0Qu04L9urmEj7VH6ImHBnljUj7iBVY8iKTaqhq2oOBoTTiADiWZiAdvh2OrG+lkLlJYqXLUq+JK8= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: OWBRkqQB0Jd4gUBpNHwn2oqExfaad55qefhMHyzNvGMjaeZrDLWsNSZEX++tjXcfGNHk2/ubioqA0x8Ge2c9FyggMw/DFET+JA4yQbE+6ntFHXVHHALyhW3ZQhVG0U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Kuqa2fxnwpeT8geb8Xt0Ew2fXjkBbifbQCKESJsbS4qXw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89a5e032-3cc8-4a98-1668-08db9e0b7c26 X-MS-Exchange-CrossTenant-AuthSource: TYZPR01MB3920.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Aug 2023 03:47:17.0215 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR01MB5462 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> From: awrhygty@outlook.com >> Cc: 65305@debbugs.gnu.org >> Date: Tue, 15 Aug 2023 22:53:01 +0900 >> >> Eli Zaretskii writes: >> >> > Is there any way of distinguishing these Python-created ZIP archives >> > from ZIP archives created by other Windows programs? >> > >> > Emacs by default assumes that file names in a ZIP archive created by a >> > Windows program are encoded in the console codepage, and it enforces >> > using that encoding for file names when the "creator" of the ZIP >> > archive indicates the archive was created by Windows programs such as >> > InfoZip's zip.exe and the File Explorer. In my testing, zip archives >> > created by Python as above record the "creator" as number 0 (zero), >> > which is identical to what InfoZip does. So, unless someone explains >> > how to distinguish these zip archives from those created by InfoZip, I >> > don't see how can Emacs know whether to use the InfoZip heuristics or >> > the Python heuristics. Without the InfoZip/File Explorer heuristics >> > we have in arc-mode.el today, Emacs on Windows would be completely >> > unable to support non-ASCII file names in ZIP archives. >> >> 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. > >> I guess unzip.exe does not support utf-8 encoded subfile name. >> Writing batch file with utf-8 encoding: >> c:\Emacs\emacs-29.1\bin\unzip.exe test.zip 一.txt >> and run with chcp 932, 荳\200.txt is extracted. >> With chcp 65001, extraction failed. >> >> Writing batch file with cp932 encoding:(same as above) >> c:\Emacs\emacs-29.1\bin\unzip.exe test.zip 一.txt >> and run with chcp 65001, 荳\200.txt is extracted. >> With chcp 932, extraction failed. >> This is not an ideal behavior, but extraction to STDOUT may work. >> >> To the contrary, 7z.exe extracts 一.txt correctly. >> If batch file is encoded with utf-8, it works with chcp 65001. >> If batch file is encoded with cp932, it works with chcp 932. > > Like I said: support for UTF-8 encoded file names on Windows is > sporadic and incomplete. It will remain so until Windows file-related > APIs support UTF-8 encoded file names. > > diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el > index 5e696c0..05a71fb 100644 > --- a/lisp/arc-mode.el > +++ b/lisp/arc-mode.el > @@ -1990,6 +1990,7 @@ archive-zip-summarize > (setq p (+ p (point-min))) > (while (string= "PK\001\002" (buffer-substring p (+ p 4))) > (let* ((creator (get-byte (+ p 5))) > + (gpflags (archive-l-e (+ p 8) 2)) > ;; (method (archive-l-e (+ p 10) 2)) > (modtime (archive-l-e (+ p 12) 2)) > (moddate (archive-l-e (+ p 14) 2)) > @@ -2001,7 +2002,12 @@ archive-zip-summarize > (efnname (let ((str (buffer-substring (+ p 46) (+ p 46 fnlen)))) > (decode-coding-string > str > - (or (if (and w32-fname-encoding > + ;; Bit 11 of general purpose bit flags (bytes > + ;; 8-9) of Central Directory: 1 means UTF-8 > + ;; encoded file names. > + (or (if (/= 0 (logand gpflags #x0800)) > + 'utf-8-unix) > + (if (and w32-fname-encoding > (memq creator > ;; This should be just 10 and > ;; 14, but InfoZip uses 0 and The patch works to list entries, and the contents can be extracted with 7z.exe. unzip.exe does not work well. 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). From unknown Sun Jun 22 00:52:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 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 X-GNU-PR-Keywords: To: awrhygty@outlook.com Cc: 65305@debbugs.gnu.org Received: via spool by 65305-submit@debbugs.gnu.org id=B65305.16921895142434 (code B ref 65305); Wed, 16 Aug 2023 12:39:02 +0000 Received: (at 65305) by debbugs.gnu.org; 16 Aug 2023 12:38:34 +0000 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 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 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==; Date: Wed, 16 Aug 2023 15:38:27 +0300 Message-Id: <83h6oz88n0.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (awrhygty@outlook.com) References: <83sf8ka6b2.fsf@gnu.org> <83bkf89x7o.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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. From unknown Sun Jun 22 00:52:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 Resent-From: awrhygty@outlook.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Aug 2023 13:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 65305@debbugs.gnu.org Received: via spool by 65305-submit@debbugs.gnu.org id=B65305.169228062917942 (code B ref 65305); Thu, 17 Aug 2023 13:58:01 +0000 Received: (at 65305) by debbugs.gnu.org; 17 Aug 2023 13:57:09 +0000 Received: from localhost ([127.0.0.1]:45237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWdUr-0004fJ-2d for submit@debbugs.gnu.org; Thu, 17 Aug 2023 09:57:09 -0400 Received: from mail-psaapc01olkn2084.outbound.protection.outlook.com ([40.92.52.84]:4096 helo=APC01-PSA-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWdUn-0004eq-4K for 65305@debbugs.gnu.org; Thu, 17 Aug 2023 09:57:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VzK9nkybPuZTXmQQX6ILI0ngygOaEUH32smQ5YG8Hbsg65BwFpV7rRwn4QSLhgHXuANnq8va/KoNw3swKnI3eU+G7xqI/nBsmpeTqs9VifruwUJz9U8MKtSQb1I9aBQpoRx3aKh+E4tciX11wORWi7oc+TDGgOQbWmLv4y8HiQiHPcYoRlzEacrPCer86/OarR7/pjoOQEcpJciSPyC3dpD1AtjU/s5iZvxJvnqME51NRP/Rx+qN09qxfKfz5dh1zMaNMMlI9r4LIE9B6/Z5y5iSGKoI6iF0N+KqDaKpo0FGPutwmO6bxttnFqTDq6FBr9d8HCHEp95h6c2dF906Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7upIweL5/WccVL2KYDKDK90x/FO9O2wuO8342lp7hOU=; b=BVD7sevKG7IjxdP8zdX6ZRzvVQFYw2RS2Eoe7lySycY7XglpzmyhvyMXIuXIE6vigfcYy2iuW+HLrCXSWALC6fw/OP0FnbXg0K44SiV6ciUEiZHrXOi4laOJ5uHmJvNqdHEFDxum5smr3gw4cMRc9+8S91s0TRvtjcjoy20G1R5hqExsOTZaRC7DBdqtHsOFUjGHrGmoRDcZJvBVPxg3Dp8ar84H6XTI8VOgYay6VcsPG9aZnAnwyHNz8mN+gLwxyqKpoLspTpQ7nFltDGWp4wY8PQomYZSFk7NqlawxWrehpgdaLpvZ2ZaBsbkihlx0PmeXGROQkunbR2hc/tOysA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7upIweL5/WccVL2KYDKDK90x/FO9O2wuO8342lp7hOU=; b=eXD03QHQtqajP0WftAggDc1/A29ObD5LBSPmw+6Hpi/jUxJhyrjiq7ajShJozUX4Ur26cDGkEnDqSosGsVaX2rsOLr48gkPWveqSOlvWJTXjrGcuCWzV0STPEf48iXieLkXN/SX/PsCZeKCeWL0UkXpQk8z/7k3sRLYEc0qyoWLIaPh/P5U3FOElopTZkO/pRhH3TDsviEE6tUxzQCPcwT9AjBriWJ8i0L6UGV4/qiUm/Q5SZ8JfwWMEECX8gcCj1geBADM/TiqlLkvhS72tLhB25fejfvm/pjBrpaexmj//eXCABweLbJn8c5s8LgyQ9IVd0umSgROm9k91NaxHSw== Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) by SI2PR01MB4570.apcprd01.prod.exchangelabs.com (2603:1096:4:1e5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.29; Thu, 17 Aug 2023 13:56:57 +0000 Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133]) by TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133%4]) with mapi id 15.20.6678.031; Thu, 17 Aug 2023 13:56:57 +0000 From: awrhygty@outlook.com In-Reply-To: <83h6oz88n0.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 16 Aug 2023 08:38:27 -0400") References: <83sf8ka6b2.fsf@gnu.org> <83bkf89x7o.fsf@gnu.org> <83h6oz88n0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Thu, 17 Aug 2023 22:56:54 +0900 Message-ID: Content-Type: multipart/mixed; boundary="=-=-=" X-TMN: [wGbxWX5OzTVdDL34Wx7pXgrg9lTYGRlg] X-ClientProxiedBy: OS0P286CA0024.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:9d::11) To TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) X-Microsoft-Original-Message-ID: <867cptvkk9.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR01MB3920:EE_|SI2PR01MB4570:EE_ X-MS-Office365-Filtering-Correlation-Id: 24667861-440e-4813-1e07-08db9f29d1e0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xMH0B94ejtofqgvofqBMvD4ZoAFAKTesNbe3UgVzkTkQXqkVdGayMQTrdH4BzVZm2qCju+lgSJh8yWskUYZ4sLsibEcWnfqLSBd0dv9+q7gLZUp9+w+g6bKE5+y+3ERi32cLQu7W+Scv7WEVLOeEcN79ObhJ5yURV6a9D7ZxmSF9dmeFDNlvENChIX/8i0AawnMmxnr5uNGYJM/KqfHTWd60jeh44oJly29S3bWWGDUr23NgQFTjKjiJhURkFSc2ofRY1wLurwqkqk/coIIJq0Q5hkLv2g/fB4sie/zntMACIfAKm5iNCGPNyeJSNBjYss7SeTEU6EPHJaU6MOmOaI/5BoZaqsR4vpuVn97sQXLhSKQWJA7LAs/00zmMy48cXIRh4ovgO3Luf84BdXMhVRZIr8f7gMoNtHUYNCq3JAhegOtI94tn9xoqb/bpG0oGr+9peTOIWgHE2066RATYugRNGmrw0gzudI8qH9okh+rD5y92cbC4GdZ2fq0kAF/oSw4LbcfrkL22MkUkaSKXa9XGfk3Lis0S+0bRvb84CZ8= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: V7emPUEy8+c1dA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lknTpTybZOdWldoAbUIT1vjsc1BMSpIK7SwMwbXl0tJVwxNNGKNfJyApPIIVHVnRaWkUEJLp1coLxGgIOVa9Acp96GRAraifhWyHUKklwuyXZ5oVPbFitzzjsLiDXZ8iu7rXPRYfDLICyf2aXOaFPUw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 24667861-440e-4813-1e07-08db9f29d1e0 X-MS-Exchange-CrossTenant-AuthSource: TYZPR01MB3920.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Aug 2023 13:56:57.0617 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR01MB4570 X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> 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. Sorry, I have mistaken something. 7z.exe works for rewriting with the settings above. (not only ascii subfiles but also cp932 encodable subfiles) I imagine if there is a special program which interprets ascii arguments into multilingual strings. Any subfile in any archive file will be treated correctly within emacs. So I implemented an instant program using base64. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=archive-utf.el Content-Transfer-Encoding: quoted-printable (require 'arc-mode)=0D =0D (setq archive-7z-program "c:/Program Files/7-Zip/7z.exe")=0D (defvar archive-utf-python-script=0D (format "\=0D import sys, base64, subprocess=0D =0D PROG_7Z =3D '%s'=0D MODE =3D sys.argv[1]=0D for i in range(2, len(sys.argv)):=0D idx =3D sys.argv[i].rfind('/')=0D sys.argv[i] =3D sys.argv[i][idx+1:]=0D sys.argv[i] =3D base64.b64decode(sys.argv[i]).decode()=0D ARCHIVE =3D sys.argv[2]=0D SUBFILES =3D sys.argv[3:]=0D SUBFILE =3D SUBFILES[0] if SUBFILES else ''=0D =0D if MODE =3D=3D 'x':=0D subprocess.run([PROG_7Z, 'x', '-so', ARCHIVE, SUBFILE])=0D elif MODE =3D=3D 'u':=0D subprocess.run([PROG_7Z, 'u', ARCHIVE, SUBFILE])=0D elif MODE =3D=3D 'd':=0D subprocess.run([PROG_7Z, 'd', ARCHIVE] + SUBFILES)=0D elif MODE =3D=3D 'l':=0D subprocess.run([PROG_7Z, 'l', ARCHIVE])=0D " archive-7z-program))=0D =0D (defvar archive-utf-extract `("python" "-c" ,archive-utf-python-script "x")= )=0D (defvar archive-utf-expunge `("python" "-c" ,archive-utf-python-script "d")= )=0D (defvar archive-utf-update `("python" "-c" ,archive-utf-python-script "u")= )=0D =0D (defun archive-utf-encode (str)=0D (base64-encode-string (encode-coding-string str 'utf-8)))=0D =0D (defun archive-zip-extract (archive name)=0D (let ((default-directory temporary-file-directory))=0D (archive-extract-by-stdout=0D (archive-utf-encode (expand-file-name archive))=0D (archive-utf-encode name)=0D archive-utf-extract)))=0D =0D (defun archive-zip-expunge (archive files)=0D (let ((default-directory temporary-file-directory))=0D (archive-*-expunge=0D (archive-utf-encode (expand-file-name archive))=0D (mapcar #'archive-utf-encode files)=0D archive-utf-expunge)))=0D =0D (defun archive-zip-write-file-member (archive descr)=0D (let ((default-directory temporary-file-directory)=0D (archive-file-name-coding-system 'archive-base64))=0D (archive-*-write-file-member=0D (archive-utf-encode (expand-file-name archive))=0D descr=0D archive-utf-update)))=0D =0C=0D (define-coding-system 'archive-base64=0D "base64 encoding"=0D :mnemonic ?B=0D :coding-type 'undecided=0D :post-read-conversion 'archive-base64-post-read-conversion=0D :pre-write-conversion 'archive-base64-pre-write-conversion)=0D =0D (defun archive-base64-post-read-conversion (len)=0D (let ((pos (point))=0D (buffer-modified-p (buffer-modified-p))=0D last-coding-system-used)=0D (prog1=0D (save-restriction=0D (narrow-to-region pos (+ pos len))=0D (base64-decode-region pos (point-max))=0D (decode-coding-region pos (point-max)'utf-8))=0D (set-buffer-modified-p buffer-modified-p))))=0D =0D (defun archive-base64-pre-write-conversion (from to)=0D (let ((buf (current-buffer)))=0D (set-buffer (generate-new-buffer " *temp*"))=0D (if (stringp from)=0D (insert from)=0D (insert-buffer-substring buf from to))=0D (let (last-coding-system-used)=0D (encode-coding-region 1 (point-max) 'utf-8)=0D (base64-encode-region 1 (point-max)))=0D nil))=0D --=-=-=-- From unknown Sun Jun 22 00:52:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Aug 2023 14:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65305 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: awrhygty@outlook.com Cc: 65305@debbugs.gnu.org Received: via spool by 65305-submit@debbugs.gnu.org id=B65305.169228196730155 (code B ref 65305); Thu, 17 Aug 2023 14:20:01 +0000 Received: (at 65305) by debbugs.gnu.org; 17 Aug 2023 14:19:27 +0000 Received: from localhost ([127.0.0.1]:45288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWdqR-0007qJ-AF for submit@debbugs.gnu.org; Thu, 17 Aug 2023 10:19:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWdqO-0007q7-Kq for 65305@debbugs.gnu.org; Thu, 17 Aug 2023 10:19:25 -0400 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 1qWdqI-0003ms-5U; Thu, 17 Aug 2023 10:19:18 -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=XW6pmhJ/pluueSUbaIjA99Tin2If+7w/3GjbivU1Fkk=; b=UTXKcyXdFqdn 9Jzg7z9VYoTJ4quLIP2SrNKWe/BsqoSMNFth9Fqf+FxDbiytcku9fRCGY0lqdRpM+AvSVS2SHveoQ cyTYlHQoyKS1ZlqiiXQGuyRTMKYm5Dafp3mjjFU/tBfkfSbPCQqCEDRnMVAEWa/agc7eh+/oEgS1i gOs4N8H5qYC5lzvyNK78KskbE4rTZ47KSHqWt6S4rchXM1gMmbJtYmNCtLdxnzKGo6CoiTIPm8nPU xBT3fZXGHTwfRGwEQ8tH2Y7+CpzvdPOLXX4n+APUcyckHaEnzO9pYuwqAR1RA/CI205Y2agQSIil9 si7flVhuQzxeqF8Z0ObBfg==; Date: Thu, 17 Aug 2023 17:19:19 +0300 Message-Id: <83cyzl69aw.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (awrhygty@outlook.com) References: <83sf8ka6b2.fsf@gnu.org> <83bkf89x7o.fsf@gnu.org> <83h6oz88n0.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: awrhygty@outlook.com > Cc: 65305@debbugs.gnu.org > Date: Thu, 17 Aug 2023 22:56:54 +0900 > > Sorry, I have mistaken something. > 7z.exe works for rewriting with the settings above. > (not only ascii subfiles but also cp932 encodable subfiles) > > I imagine if there is a special program which interprets ascii arguments > into multilingual strings. > Any subfile in any archive file will be treated correctly within emacs. > So I implemented an instant program using base64. I guess it's a special feature of 7-zip that it supports base64-encoded file names? Since 7-zip is not really Free Software, I'm reluctant to go to such lengths on its behalf, especially since it's only for MS-Windows. From unknown Sun Jun 22 00:52:36 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: awrhygty@outlook.com Subject: bug#65305: closed (Re: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8) Message-ID: References: <837cplq7zb.fsf@gnu.org> X-Gnu-PR-Message: they-closed 65305 X-Gnu-PR-Package: emacs Reply-To: 65305@debbugs.gnu.org Date: Thu, 24 Aug 2023 06:18:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1692857882-31101-1" This is a multi-part message in MIME format... ------------=_1692857882-31101-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 65305@debbugs.gnu.org. --=20 65305: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D65305 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1692857882-31101-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 65305-done) by debbugs.gnu.org; 24 Aug 2023 06:17:48 +0000 Received: from localhost ([127.0.0.1]:35959 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZ3f9-00085E-PO for submit@debbugs.gnu.org; Thu, 24 Aug 2023 02:17:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZ3f7-000850-MZ for 65305-done@debbugs.gnu.org; Thu, 24 Aug 2023 02:17:46 -0400 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 1qZ3ey-0005Ou-3n; Thu, 24 Aug 2023 02:17:36 -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=XymVRfPxb7goQOqeIulNbqrjzBvsKm6j5Kl3TxhyoO8=; b=IzYLu6YKAzwI q9Q/OFYo3HsnerP5x4W3C6QUtL1mWOaWGtnoa2uPdjU3InP7feix5SP/jSUv48V/nW2e5d9kvBvnT IOq9Ajf18GoqyN7+C0p4dfX95QVNiRhQjEr51hkTw15Pkiof5AYfkqKDpCvwLHXtfQSrKB3nxXZiF OZmeJbg3Sk794KPFLcoIkFim+GdoqiXw7xeODna6PYKqFJlP8CqE972xm/sjlDZc79TWE6YenCyPr TmiQ/dzuZleUB+T54BBk5uFGaoMrAcVLwEesRvIOdN3JmhN6dClSZmbxNdQIw4ufcSZNeaf1y9aeo dsmjGsan73fAnOLvQU8WEA==; Date: Thu, 24 Aug 2023 09:18:00 +0300 Message-Id: <837cplq7zb.fsf@gnu.org> From: Eli Zaretskii To: awrhygty@outlook.com In-Reply-To: <83cyzl69aw.fsf@gnu.org> (message from Eli Zaretskii on Thu, 17 Aug 2023 17:19:19 +0300) Subject: Re: bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 References: <83sf8ka6b2.fsf@gnu.org> <83bkf89x7o.fsf@gnu.org> <83h6oz88n0.fsf@gnu.org> <83cyzl69aw.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65305-done Cc: 65305-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 65305@debbugs.gnu.org > Date: Thu, 17 Aug 2023 17:19:19 +0300 > From: Eli Zaretskii > > > From: awrhygty@outlook.com > > Cc: 65305@debbugs.gnu.org > > Date: Thu, 17 Aug 2023 22:56:54 +0900 > > > > Sorry, I have mistaken something. > > 7z.exe works for rewriting with the settings above. > > (not only ascii subfiles but also cp932 encodable subfiles) > > > > I imagine if there is a special program which interprets ascii arguments > > into multilingual strings. > > Any subfile in any archive file will be treated correctly within emacs. > > So I implemented an instant program using base64. > > I guess it's a special feature of 7-zip that it supports > base64-encoded file names? Since 7-zip is not really Free Software, > I'm reluctant to go to such lengths on its behalf, especially since > it's only for MS-Windows. No further comments, so I'm now closing this bug. ------------=_1692857882-31101-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Aug 2023 04:31:35 +0000 Received: from localhost ([127.0.0.1]:34839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVliR-0005mA-5e for submit@debbugs.gnu.org; Tue, 15 Aug 2023 00:31:35 -0400 Received: from lists.gnu.org ([2001:470:142::17]:42664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qVliO-0005lv-AZ for submit@debbugs.gnu.org; Tue, 15 Aug 2023 00:31:32 -0400 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 1qVliH-0006ab-1n for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 00:31:25 -0400 Received: from mail-psaapc01olkn2055.outbound.protection.outlook.com ([40.92.52.55] helo=APC01-PSA-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qVliE-0004g9-T1 for bug-gnu-emacs@gnu.org; Tue, 15 Aug 2023 00:31:24 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Oyw+r9Fcq4dAivyJrryJmEbiuEh7Y1Kh5tz1zuRU+b640oaQBLFxvqKJAx5B+Rv2B5WFIPq5Ehjl24+HsQJf4xCrafABbYCE9xdcfwbbrC3s+sBVpqad66eJkjWGF/oDU2t2bMAuLVF61Z2YWAdl5aYsrxJgrkUUkZd4+6/DI+mmQw9orDPuhjNAvym51pabHHbNLkRydtDOMO58o8AGKvGX5YNV9+bkDDZDUqLpI5HGj2TuQoJUC4EOIxdzGTb8zeF5dYPrnOL/DA+BGNAjMH0AWKCQnEhxtQtxmXCGbTwI/W4KFaIH5OZ9Siu4TPJS+vP9w2eJxKzlO6YDBI3yRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Hb7qNPcbuochCD/63rmln3R65hOsQg53VC5MkRWzBCk=; b=RS8xq9kBug0P/Pf/ADCPaALZlxdiq4c6/Vyo3JOhhKH/ZDaOL49TZCI/rK+rgq/I1YNvMzHin4e23n1HW4Qi/2EQlF990w8DdZrYVkTY3B8RjeRuL2O/hZQBoEjFwB8dFi5Q6bvDGGRTErynXF7Lvl2DdE3gWQ/ynPlbw+4fFAcHcyui//PM/XMbMJhXhr+XiBJNTAbIZW5WfR2rBQ0tBrd9N1f1rBqEThR3PXvhpBQ3ORT2Adp5X067CaAj4MMzrhxNgITfgAAtxeHp4iW4mQwW6uwo5rfOlbMz3hcgHCezBcL7vZw/FmarYfpp5uxbLBpmP17wSzpXbXOc84I4gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hb7qNPcbuochCD/63rmln3R65hOsQg53VC5MkRWzBCk=; b=f5E2DaNqgPm50w5RnjZU9Bb/vSBpc6JMeT0rqVixvLPmbG7YJofAgEyue1/dlIZdQgFFcSnqGDBJgR0hvKkHaVtMGNDbs5NTqh/U6GzG9xfVcgEKs68Xa6rSOM4kW3AyWSRXC5utATz+7VCrK31lZs0Kuj2/qp7Xtb5DON5l/uf9ZJxGnjgDXM0TNct0CcrkjOmoA3rvwA8Lxy+4Ed78MG5miH6Dw96Zb2PmESjdnXS7eq9/dIxfGh2H4FTMjkSxaAZ2SLLA/R9hGiBgr6FybYwDNKPBUUWu+1SyGPKCmOPjPOs75iRMfnfXm7xmU4xugk6Ny0Gfnm2rV/5iViUM/A== Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) by SEYPR01MB4152.apcprd01.prod.exchangelabs.com (2603:1096:101:54::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Tue, 15 Aug 2023 04:31:18 +0000 Received: from TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133]) by TYZPR01MB3920.apcprd01.prod.exchangelabs.com ([fe80::72cf:3224:cab3:a133%4]) with mapi id 15.20.6678.022; Tue, 15 Aug 2023 04:31:18 +0000 From: awrhygty@outlook.com To: bug-gnu-emacs@gnu.org Subject: 29.1; archive-mode can not handle subfile names encoded with utf-8 Date: Tue, 15 Aug 2023 13:31:16 +0900 Message-ID: Content-Type: text/plain; charset=iso-2022-jp X-TMN: [KwETN3MlrZY6adgiQSLiCyRLLEf/Hxpe] X-ClientProxiedBy: OS7PR01CA0101.jpnprd01.prod.outlook.com (2603:1096:604:256::20) To TYZPR01MB3920.apcprd01.prod.exchangelabs.com (2603:1096:400:30::11) X-Microsoft-Original-Message-ID: <86wmxx2agb.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYZPR01MB3920:EE_|SEYPR01MB4152:EE_ X-MS-Office365-Filtering-Correlation-Id: 78637f30-24cf-4881-6bd5-08db9d487811 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info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EzWUZnb1N1WnJu?= =?iso-2022-jp?B?eHdRYnF0aVBiOW1IVzdaM0lSL2cydUlLYWk5a3E1SWhMNExCSjVJT0Vw?= =?iso-2022-jp?B?SWFmL2UvYmc4aVhNc0FYR3U5WmpNeTZOU1YxMFl2UkIxNGpRNE1rYWMv?= =?iso-2022-jp?B?YWxwSEo1OFFncEtETUtLRU1oVDJnWWt4aWgvalIzR3FFM3dNdTYvM1BK?= =?iso-2022-jp?B?cjFqNlppQ09jbVRoSE5pUDBSVHZtaFhSdy83b3d0Qmt6UE5PTWlpYms4?= =?iso-2022-jp?B?aTNtU0laNVVHOWdxOUZoMGJwV2xXWjBaZzFaOVBSMWtPejI0U2xHQXNB?= =?iso-2022-jp?B?ekhTNTZBUThPV3c5OWZPM2NuaFRBTDJUaDZTUWpGQnVlSm8rNFp3aW5N?= =?iso-2022-jp?B?UE5MYnRRRXByTEEyUmtZN1FHMnRvVy9FeXlaQ3FoTmtWMzBLVFZrOGFK?= =?iso-2022-jp?B?SUZFUGU1alQxREZmWkwwYzJ2dXhFV2V5dFYrU01hdU1hcjR5Qng5bHpM?= =?iso-2022-jp?B?Tlc4dFNueGNNaDJrOTZDaHplaEE9PQ==?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78637f30-24cf-4881-6bd5-08db9d487811 X-MS-Exchange-CrossTenant-AuthSource: TYZPR01MB3920.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2023 04:31:18.2510 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR01MB4152 Received-SPF: pass client-ip=40.92.52.55; envelope-from=awrhygty@outlook.com; helo=APC01-PSA-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) With python 3.10, ZIP archive can be created with: python -m zipfile -c ARCHIVE.zip subfile If the subfile name contains non-ASCII characters, they are encoded with utf-8 in anyway. Such subfile names are decoded with local language encoding(cp932 for Japanese Windows OS) in archive-mode. For example, archive 一.txt in test.zip with python: python -m zipfile -c test.zip 一.txt The subfile name is shown as 荳\200.txt in archive-mode buffer and the entry can not be extracted. In GNU Emacs 29.1 (build 2, x86_64-w64-mingw32) of 2023-08-02 built on AVALON Windowing system distributor 'Microsoft Corp.', version 10.0.19045 System Description: Microsoft Windows 10 Pro (v10.0.2009.19045.3324) Configured using: 'configure --with-modules --without-dbus --with-native-compilation=aot --without-compress-install --with-tree-sitter CFLAGS=-O2' Configured features: ACL GIF GMP GNUTLS HARFBUZZ JPEG JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB (NATIVE_COMP present but libgccjit not available) Important settings: value of $LANG: JPN locale-coding-system: cp932 Major mode: Dired Minor modes in effect: shell-dirtrack-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (wdired qp files-x shell pcomplete comint ansi-osc ansi-color ring dired-aux image-mode exif arc-mode archive-mode pp shadow emacsbug help-mode gnutls network-stream nsm mailalias smtpmail textsec uni-scripts url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util url-parse auth-source eieio eieio-core cl-macs json map byte-opt gv bytecomp byte-compile url-vars idna-mapping ucs-normalize uni-confusable textsec-check sort cl-seq misearch multi-isearch mail-extr message sendmail mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader cl-loaddefs cl-lib term/bobcat japan-util rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel dos-w32 ls-lisp disp-table term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads w32notify w32 lcms2 multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 239724 23153) (symbols 48 8782 7) (strings 32 40794 3846) (string-bytes 1 887485) (vectors 16 45221) (vector-slots 8 1276135 125856) (floats 8 105 354) (intervals 56 1746 0) (buffers 984 17)) ------------=_1692857882-31101-1--