emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 27 May 2019 08:24:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> A related issue: C-h f string-as-unibyte
>
>     string-as-unibyte is a built-in function in `src/fns.c'.
>
>     (string-as-unibyte STRING)
>
>       This function is obsolete since 26.1;
>       use `encode-coding-string'.
>       Probably introduced at or before Emacs version 20.3.
>       This function does not change global state, including the match data.
>
> Having trawled through the elisp manual, for the life of me itʼs not
> clear which coding system I should use. 'raw-text'? 'us-ascii'?
> Something Else?

The coding that most closely corresponds to what string-as-unibyte does
is `emacs-internal`.  In 90% of the cases, it's not what you want, tho
because the code shouldn't have used string-as-unibyte in the
first place, so you'll need to find out what the code *really* needs.


        Stefan




reply via email to

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