GNU bug report logs -
#16048
24.3.50; String compare surprise
Previous Next
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: Michael Albinus <michael.albinus <at> gmx.de>
> Date: Wed, 04 Dec 2013 15:05:00 +0100
> Cc: 16048-done <at> debbugs.gnu.org
>
> Ah, well. In `dbus-unescape-from-identifier', there is
>
> (lambda (x) (format "%c" (string-to-number (substring x 1) 16)))
>
> If I replace it by
>
> (lambda (x) (byte-to-string (string-to-number (substring x 1) 16)))
>
> everything works fine.
Beware: byte-to-string returns a unibyte string. You do NOT want
unibyte strings in your application code. The problem you had that
started this thread is a very good demonstration why.
So I would leave dbus-unescape-from-identifier intact, and instead fix
the other side of the string comparison, the one that yields "\377".
This bug report was last modified 11 years and 221 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.