bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38587: base64-decode-region breaks encoding


From: Lars Ingebrigtsen
Subject: bug#38587: base64-decode-region breaks encoding
Date: Tue, 17 Dec 2019 17:27:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Juri Linkov <juri@linkov.net> 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





reply via email to

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