[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte b
From: |
Stefan Monnier |
Subject: |
Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer |
Date: |
Tue, 28 May 2019 19:39:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> If the input string is unibyte, then using string-to-unibyte will be
> also odd. And if it's multibyte, the using encode-coding-string is
> not really odd, is it?
It's odd that the input string be multibyte since it's supposed to be
encoded, yes. And it's also odd to call encode-coding-string on
a string that we assume to be encoded (just because the string is
multibyte doesn't make it less odd).
In any case, I think we should strive to avoid using "encoded" multibyte
strings. I can't remember ever having had a need for those, but when
needed the way to turn a unibyte string into an equivalent multibyte
string (without changing the fact that it's encoded) is
string-to-multibyte.
>> I agree that removing the call altogether is the better option.
>
> Right. In that case we need to document that the function expects as
> input either a unibyte string or a pure-ASCII string.
OK, I'll do that.
Stefan
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, (continued)
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Stefan Monnier, 2019/05/27
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/27
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Stefan Monnier, 2019/05/27
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/28
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Robert Pluim, 2019/05/28
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Stefan Monnier, 2019/05/28
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Stefan Monnier, 2019/05/28
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/28
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Stefan Monnier, 2019/05/28
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/28
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer,
Stefan Monnier <=
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/28
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Stefan Monnier, 2019/05/29
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/29
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Stefan Monnier, 2019/05/29
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/29
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Stefan Monnier, 2019/05/29
- Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/27
Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/27
Re: emacs-26 8f18d12: Improve documentation of decoding into a unibyte buffer, Eli Zaretskii, 2019/05/27