zsh-workers
 help / color / mirror / 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

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git