Subject: Re: bug#38587: base64-decode-region breaks encoding

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 17 Dec 2019 17:27:06 +0100

Juri Linkov <[email-masked]> writes:

> But is it still possible to tell base64-decode-region
> about the expected output coding system?

Anything is possible, but it doesn't make sense to complicate a function
like that in this manner.  These functions perform a transformation from
one set of octets to a different set of octets, and they have nothing to
do with characters.

We have a bunch of functions in Emacs that work on bytes, and not on
characters.  The way to use them is always (assuming you're starting
with something that is text) to use encode-coding-region first, and
(going in the opposite direction), if you want to end up with something
that is text afterwards, you have to call decode-coding-region
afterwards.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no