zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: zcompile doesn't support Unicode file names
Date: Sun, 12 Jul 2020 17:51:06 +0000	[thread overview]
Message-ID: <20200712175106.58b43b7d@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <CAKc7PVALXfBJcnsWk3-brU=y7nt0WnYh_LmQacN+WMo5xGRonA@mail.gmail.com>

Sebastian Gniazdowski wrote on Sun, 12 Jul 2020 19:28 +0200:
> % touch ↑abc
> % zcompile ↑abc
> zcompile: can't open file: ↑abc

Looks like some unmeta() calls are missing.  One of them is below —
wasn't hard to find; I just opened bin_zcompile() and searched for the
error message — but with that patch I get 'b\xc3\x83\x81r.zwc' rather
than 'bár.zwc', so I guess a few more calls are needed.  I won't be
tracking them down.

(Not going to commit this patch, either.  It's incomplete and lacks a
test case.)

diff --git a/Src/parse.c b/Src/parse.c
index 10c9b4c29..9deda2aea 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -3399,7 +3399,7 @@ build_dump(char *nam, char *dump, char **files, int ali, int map, int flags)
 	    flags = (flags & ~(FDHF_KSHLOAD | FDHF_ZSHLOAD)) | FDHF_ZSHLOAD;
 	    continue;
 	}
-	if ((fd = open(*files, O_RDONLY)) < 0 ||
+	if ((fd = open(unmeta(*files), O_RDONLY)) < 0 ||
 	    fstat(fd, &st) != 0 || !S_ISREG(st.st_mode) ||
 	    (flen = lseek(fd, 0, 2)) == -1) {
 	    if (fd >= 0)

      reply	other threads:[~2020-07-12 17:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-12 17:28 Sebastian Gniazdowski
2020-07-12 17:51 ` Daniel Shahaf [this message]

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=20200712175106.58b43b7d@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \
    /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 public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).