[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43598: replace-in-string: finishing touches
From: |
Eli Zaretskii |
Subject: |
bug#43598: replace-in-string: finishing touches |
Date: |
Fri, 25 Sep 2020 12:21:45 +0300 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Fri, 25 Sep 2020 01:18:13 +0200
> Cc: 43598@debbugs.gnu.org
>
> So: "a\377ø" is a multibyte string with five bytes (the "raw byte" is in
> the private plane).
>
> "a\377a" is a unibyte string with three bytes.
>
> So searching for "\377" (one-byte unibyte string) and (make-string 1
> 255) (two-byte multibyte string) should be well-defined in either
> combination here?
>
> "\377" is in both "a\377ø" and "a\377a".
>
> (make-string 1 255) is in neither "a\377ø", nor "a\377a".
>
> And:
>
> (eq (elt (make-string 1 255) 0) (elt "\377" 0))
> => t
Would it help to always convert the first argument of
replace-in-string to a multibyte string, before replacing?
- bug#43598: replace-in-string: finishing touches, Mattias Engdegård, 2020/09/24
- bug#43598: replace-in-string: finishing touches, Lars Ingebrigtsen, 2020/09/24
- bug#43598: replace-in-string: finishing touches, Mattias Engdegård, 2020/09/25
- bug#43598: replace-in-string: finishing touches, Lars Ingebrigtsen, 2020/09/25
- bug#43598: replace-in-string: finishing touches, Mattias Engdegård, 2020/09/25
- bug#43598: replace-in-string: finishing touches, Lars Ingebrigtsen, 2020/09/25
- bug#43598: replace-in-string: finishing touches, Lars Ingebrigtsen, 2020/09/26
- bug#43598: replace-in-string: finishing touches, Lars Ingebrigtsen, 2020/09/26
- bug#43598: replace-in-string: finishing touches, Mattias Engdegård, 2020/09/27
- bug#43598: replace-in-string: finishing touches, Richard Stallman, 2020/09/27