GNU bug report logs - #56469
29.0.50; Unibyte dir in directory_files_internal

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Sat, 9 Jul 2022 17:46:01 UTC

Severity: normal

Found in version 29.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 56469 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 56469 <at> debbugs.gnu.org
Subject: Re: bug#56469: 29.0.50; Unibyte dir in directory_files_internal
Date: Sun, 10 Jul 2022 11:19:22 -0400
> That could be the situation _today_, but that's just sheer luck (or
> lack thereof).  In general, all the file-handling code we have in
> fileio.c and dired.c should be equally prepared to handle unibyte
> non-ASCII file names and multibyte file names, because we may need
> that any time.  When we make changes in Emacs, we shouldn't be worried
> whether those changes could cause some dired.c code be called early on
> during Emacs startup.

Agreed.  In the updated comment I noted that we have a bug when we do

    (let ((file-name-coding-system 'binary))
      (directory-files "/tmp/été/" 'full)

because we'll be concatenating the multibyte string "/tmp/été/" with
the undecoded unibyte strings of the names of files in that directory.


        Stefan





This bug report was last modified 2 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.