From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26813 invoked from network); 12 Jul 2020 17:51:57 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 12 Jul 2020 17:51:57 -0000 Received: (qmail 29050 invoked by alias); 12 Jul 2020 17:51:52 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: Sender: zsh-workers@zsh.org X-Seq: 46239 Received: (qmail 14109 invoked by uid 1010); 12 Jul 2020 17:51:52 -0000 X-Qmail-Scanner-Diagnostics: from wout2-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25870. spamassassin: 3.4.4. Clear:RC:0(64.147.123.25):SA:0(-2.6/5.0):. Processed in 4.678657 secs); 12 Jul 2020 17:51:52 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrvdeigdduvdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfgjfhfogggtgfesthhqtddtredtjeenucfhrhhomhepffgrnhhi vghlucfuhhgrhhgrfhcuoegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvgeqne cuggftrfgrthhtvghrnhephfdtteefheevuedthedutdeifeegteettdejtdffheduieei jeelteetkeduteehnecukfhppeejledrudejiedrfeelrdeileenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrshhh rghhrghfrdhnrghmvg X-ME-Proxy: Date: Sun, 12 Jul 2020 17:51:06 +0000 From: Daniel Shahaf To: Sebastian Gniazdowski Cc: Zsh hackers list Subject: Re: zcompile doesn't support Unicode file names Message-ID: <20200712175106.58b43b7d@tarpaulin.shahaf.local2> In-Reply-To: References: X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sebastian Gniazdowski wrote on Sun, 12 Jul 2020 19:28 +0200: > % touch =E2=86=91abc > % zcompile =E2=86=91abc > zcompile: can't open file: =E2=86=91abc Looks like some unmeta() calls are missing. One of them is below=C2=A0=E2= =80=94 wasn't hard to find; I just opened bin_zcompile() and searched for the error message=C2=A0=E2=80=94 but with that patch I get 'b\xc3\x83\x81r.zwc'= rather than 'b=C3=A1r.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 a= li, int map, int flags) flags =3D (flags & ~(FDHF_KSHLOAD | FDHF_ZSHLOAD)) | FDHF_ZSHLOAD; continue; } - if ((fd =3D open(*files, O_RDONLY)) < 0 || + if ((fd =3D open(unmeta(*files), O_RDONLY)) < 0 || fstat(fd, &st) !=3D 0 || !S_ISREG(st.st_mode) || (flen =3D lseek(fd, 0, 2)) =3D=3D -1) { if (fd >=3D 0)