From: Eli Zaretskii <eliz@gnu.org>
To: awrhygty@outlook.com
Cc: 65305@debbugs.gnu.org
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 [thread overview]
Message-ID: <83h6oz88n0.fsf@gnu.org> (raw)
In-Reply-To: <TYZPR01MB39205F2F052C03AFB1C2F78EC315A@TYZPR01MB3920.apcprd01.prod.exchangelabs.com> (awrhygty@outlook.com)
> From: awrhygty@outlook.com
> Cc: 65305@debbugs.gnu.org
> Date: Wed, 16 Aug 2023 12:47:14 +0900
>
> Eli Zaretskii <eliz@gnu.org> 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.
next prev parent reply other threads:[~2023-08-16 12:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 4:31 bug#65305: 29.1; archive-mode can not handle subfile names encoded with utf-8 awrhygty
2023-08-15 11:33 ` Eli Zaretskii
2023-08-15 13:53 ` awrhygty
2023-08-15 14:50 ` Eli Zaretskii
2023-08-16 3:47 ` awrhygty
2023-08-16 12:38 ` Eli Zaretskii [this message]
2023-08-17 13:56 ` awrhygty
2023-08-17 14:19 ` Eli Zaretskii
2023-08-24 6:18 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h6oz88n0.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=65305@debbugs.gnu.org \
--cc=awrhygty@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.