emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why does dired go through extra efforts to avoid unibyte names


From: Stefan Monnier
Subject: Re: Why does dired go through extra efforts to avoid unibyte names
Date: Wed, 03 Jan 2018 15:09:06 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Eight-bit-* characters are not in general modified by encoding them,
> so you could encode them any number of times and still get the same
> bytes as result.

Agreed.  But even if it were not the case, I don't see why that would
explain the presence of this code.

>> > As for the reason for using string-to-multibyte: maybe it's because we
>> > use concat further down in the function, which will determine whether
>> > the result will be unibyte or multibyte according to its own ideas of
>> > what's TRT?
>> But `concat` will do a string-to-multibyte for us, if needed
> Not if the other concatenated parts are ASCII (which tend to be
> unibyte strings).

But that's still perfectly fine as well since it will then result in
a unibyte string which will get "encoded" correctly.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]