zsh-workers
 help / color / mirror / code / Atom feed
* zcompile doesn't support Unicode file names
@ 2020-07-12 17:28 Sebastian Gniazdowski
  2020-07-12 17:51 ` Daniel Shahaf
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Gniazdowski @ 2020-07-12 17:28 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

Hi,

% touch ↑abc
% zcompile ↑abc
zcompile: can't open file: ↑abc

-- 
Sebastian Gniazdowski
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: zcompile doesn't support Unicode file names
  2020-07-12 17:28 zcompile doesn't support Unicode file names Sebastian Gniazdowski
@ 2020-07-12 17:51 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2020-07-12 17:51 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: Zsh hackers list

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-12 17:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-12 17:28 zcompile doesn't support Unicode file names Sebastian Gniazdowski
2020-07-12 17:51 ` Daniel Shahaf

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).