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


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 16048 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#16048: 24.3.50; String compare surprise
Date: Thu, 05 Dec 2013 19:38:51 +0200
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Cc: Eli Zaretskii <eliz <at> gnu.org>,  16048 <at> debbugs.gnu.org
> Date: Thu, 05 Dec 2013 08:51:41 +0100
> 
> > IIUC this is dbus code, so it likely handles marshalled data, which
> > often has to manage bytes rather than chars, so a unibyte string might
> > be the right thing.
> 
> Indeed. My ert test case is
> 
>   (should
>    (string-equal
>     (dbus-unescape-from-identifier
>      (dbus-escape-as-identifier "0123abc_xyz\x01\xff"))
>     "0123abc_xyz\x01\xff"))

FWIW, I don't see anything in this snippet that requires unibyte
strings.

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.




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

Previous Next


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