[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:44:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>> I think this is an error. The patch below seems in order.
>
> I'm not sure. Be sure to read the comments about the tricky business
> of this function, and the method it employs to solve it, and be sure
> you understand all of the subtleties there.
This only applies to the case where `char` is not ASCII.
I installed a slightly more conservative patch which should make sure
the returned string is always unibyte and that also fixes the ebcdic
case at the same occasion.
>> AFAIK it only happens for pure-ASCII strings.
> What is your reasoning?
For one, the docstring says that, pretty much. But also the fact that
`undecided` implies that any coding system should be applicable, IOW
`char` is in the intersection of all the coding systems we have, so it
can only happen if the string is pure ASCII (since one of the coding
systems is `us-ascii`, the insection cannot be larger than that.
That doesn't preclude a non-undefined return value for some pure ASCII
strings, admittedly, tho the docstring suggests that any ASCII string
just returns `undecided`).
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/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, 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/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, 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