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: Andreas Schwab
Subject: bug#38587: base64-decode-region breaks encoding
Date: Sun, 15 Dec 2019 09:56:18 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

On Dez 15 2019, Juri Linkov wrote:

> Maybe an additional CODING arg for base64-decode-region?

BASE64 is defined on a sequence of bytes.  It doesn't make sense to
apply it to characters.

The input of base64-encode-region needs to be encoded into bytes and the
output of base64-decode-region needs to be decoded into characters.  If
you do that, you get a full reversible operation.

> Or it would be enough to use the coding system of the
> output buffer?

The coding system of the output buffer has nothing to do with the coding
of the data produced by base64-decode-region, just like
process-coding-system is independent from the coding system of the
process buffer.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





reply via email to

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