Subject: Re: bug#16048: 24.3.50; String compare surprise

From: Eli Zaretskii <[email-masked]>
Date: Wed, 04 Dec 2013 19:34:37 +0200

> From: Michael Albinus <[email-masked]>
> Date: Wed, 04 Dec 2013 15:05:00 +0100
> Cc: [email-masked]
> 
> 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".