[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: More confusion about multibyte vs unibyte strings
From: |
Stefan Monnier |
Subject: |
Re: More confusion about multibyte vs unibyte strings |
Date: |
Fri, 06 May 2022 13:39:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>>> If the search string is multibyte (in my mind this means "multiple bytes
>>> per character", I guess that's where I went wrong), you have to encode
>>
>> In ELisp, "multibyte" means "a sequence of characters", whereas
>> "unibyte" means "a sequence of bytes".
>
> Okay, thanks. I'd thought that distinction was covered by "encoded" vs
> "decoded" strings. Maybe the lesson will stick this time.
There's no reliable way to determine whether a string is decoded (other
than to trace its origin and figure out what the code intended it to
mean).
This said, multibyte/unibyte can be used as an approximation of
decoded/encoded (my own local hacks include signaling errors when
trying to decode a multibyte string or to encode a unibyte string, but
it trips over various places where we do that for legitimate
reasons :-( )
Stefan
- More confusion about multibyte vs unibyte strings, Eric Abrahamsen, 2022/05/05
- Re: More confusion about multibyte vs unibyte strings, Eli Zaretskii, 2022/05/05
- Re: More confusion about multibyte vs unibyte strings, Eric Abrahamsen, 2022/05/05
- Re: More confusion about multibyte vs unibyte strings, Eli Zaretskii, 2022/05/05
- Re: More confusion about multibyte vs unibyte strings, Eric Abrahamsen, 2022/05/05
- Re: More confusion about multibyte vs unibyte strings, Stefan Monnier, 2022/05/05
- Re: More confusion about multibyte vs unibyte strings, Eric Abrahamsen, 2022/05/06
- Re: More confusion about multibyte vs unibyte strings,
Stefan Monnier <=
- Re: More confusion about multibyte vs unibyte strings, Eric Abrahamsen, 2022/05/06