GNU bug report logs - #16048
24.3.50; String compare surprise

Previous Next

Package: emacs;

Reported by: michael.albinus <at> gmx.de

Date: Wed, 4 Dec 2013 11:45:03 UTC

Severity: normal

Found in version 24.3.50

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16048 <at> debbugs.gnu.org, Michael Albinus <michael.albinus <at> gmx.de>
Subject: bug#16048: 24.3.50; String compare surprise
Date: Thu, 05 Dec 2013 14:11:11 -0500
> Just to make it clear: Emacs is perfectly capable of holding raw bytes
> in multibyte strings.  That's why we have the eight-bit charset.

When manipulating sequences of bytes (as opposed to sequences of chars),
I find it is preferable to use unibyte strings.

Indeed, multibyte strings can work as well, but they can be more tricky
to work with since `aref' returns a "eight-bit byte" character rather
than a value between 128-255.

Of course, if your string can contain a mix of bytes and chars, you
don't have a choice.


        Stefan




This bug report was last modified 11 years and 172 days ago.

Previous Next


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