GNU bug report logs - #29189
25.3; Dired does not work with binary filenames

Previous Next

Package: emacs;

Reported by: Allen Li <vianchielfaura <at> gmail.com>

Date: Tue, 7 Nov 2017 09:04:01 UTC

Severity: minor

Found in version 25.3

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

Bug is archived. No further changes may be made.

Full log


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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Kenichi Handa <handa <at> gnu.org>, 29189 <at> debbugs.gnu.org, schwab <at> suse.de,
 vianchielfaura <at> gmail.com
Subject: Re: bug#29189: 25.3; Dired does not work with binary filenames
Date: Fri, 05 Jan 2018 17:16:30 -0500
> I found that the alternative patch below solves the original problem
> without any changes needed in files.el, and without introducing any
> performance hits.  Does anyone see a problem with this proposed patch?

[ With Andreas's adjustment]  It looks sane to me.

Decoding applied to multibyte text is a rather odd situation (tho I'm
surprised this problem hasn't been noticed until now).
It should very much come with a few tests to verify that
(decode-coding-string (string-to-multibyte (encode-coding-string X)))
is just a more expensive alternative to
(decode-coding-string (encode-coding-string X))).

I'd also be tempted to additionally signal an error if a non-byte
(i.e. a char that's neither ASCII nor eight-bit-byte) is found since
"decoding" in that case is meaningless.  Tho this is obviously not for
the emacs-26 branch.


        Stefan




This bug report was last modified 6 years and 261 days ago.

Previous Next


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