GNU bug report logs - #38587
base64-decode-region breaks encoding

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Fri, 13 Dec 2019 00:04:01 UTC

Severity: normal

Tags: wontfix

Fixed in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: bug-gnu-emacs <at> gnu.org
Subject: base64-decode-region breaks encoding
Date: Fri, 13 Dec 2019 01:55:56 +0200
0. emacs -Q
1. insert a non-ASCII char, e.g. ä
2. select the region around the char
3. M-x base64-encode-region
4. select the region around the encoded text
5. M-x base64-decode-region

results in a broken text.  IOW, base64-encode-region and base64-decode-region
are not reversible, whereas their string counterparts are:

(base64-decode-string (base64-encode-string "ä"))
=> "\344"

(the latter expression returns the right result, but inserts broken text too)




This bug report was last modified 5 years and 148 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.