GNU bug report logs - #43632
Raw bytes printed as latin-1 in echo area and *Messages*

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Sat, 26 Sep 2020 12:52:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Mattias Engdegård <mattiase <at> acm.org>
Cc: 43632 <at> debbugs.gnu.org
Subject: bug#43632: Raw bytes printed as latin-1 in echo area and *Messages*
Date: Sat, 26 Sep 2020 17:14:20 +0300
> From: Mattias Engdegård <mattiase <at> acm.org>
> Date: Sat, 26 Sep 2020 14:51:22 +0200
> 
>  M-: "\377"
>  => "ÿ"
> 
> in both the echo area and in *Messages*. The expected message is "\377".
> 
> The same thing happens with
> 
>  (prin1 "\377" t)
> 
> This anomaly was first observed by Lars Ingebrigtsen.

It is not an anomaly.  If you want to see escapes, set
print-escape-nonascii non-nil.

Also note that what you see is the result of 'eval' printing the
result, the real result (as returned by prin1) is a unibyte string:

  (multibyte-string-p (prin1 "\377")) => nil

(Yes, this is very confusing.)




This bug report was last modified 4 years and 298 days ago.

Previous Next


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