GNU bug report logs - #58168
string-lessp glitches and inconsistencies

Previous Next

Package: emacs;

Reported by: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>

Date: Thu, 29 Sep 2022 16:25:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Mattias EngdegÄrd <mattias.engdegard <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58168 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: bug#58168: string-lessp glitches and inconsistencies
Date: Sat, 1 Oct 2022 13:51:02 +0200
1 okt. 2022 kl. 07.34 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> (What about printing it as "\u0080" instead?
> 
> NO!!  \u0080 is something entirely different.

Actually not -- (string 128) returns the multibyte string consisting of the single char U+0080, which is exactly what you get by typing "\u0080".
It confuses me, too. That's a C1 control char and Emacs doesn't escape it when printing, but it's displayed as `\200`.

(I don't think changing that display to \u0080 would break any compatibility; we should consider doing that for all C1 controls, U+0080..U+009F.)

Even more confusing is that "\x0080" means the same as "\u0080" but not the same as "\x80", which is a unibyte string of a single raw byte.





This bug report was last modified 2 years and 276 days ago.

Previous Next


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