[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#29189: 25.3; Dired does not work with binary filenames
From: |
Stefan Monnier |
Subject: |
bug#29189: 25.3; Dired does not work with binary filenames |
Date: |
Fri, 05 Jan 2018 17:16:30 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> 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
- bug#29189: 25.3; Dired does not work with binary filenames,
Stefan Monnier <=