From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#16048: 24.3.50; String compare surprise Date: Wed, 04 Dec 2013 19:34:37 +0200 Message-ID: <83zjog34gi.fsf@gnu.org> References: <87r49six1s.fsf@igel.home> <878uw0ogoj.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1386178514 26873 80.91.229.3 (4 Dec 2013 17:35:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 4 Dec 2013 17:35:14 +0000 (UTC) Cc: 16048@debbugs.gnu.org To: Michael Albinus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 04 18:35:18 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VoGM1-0000rG-At for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Dec 2013 18:35:17 +0100 Original-Received: from localhost ([::1]:49572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoGM0-0001Xt-VW for geb-bug-gnu-emacs@m.gmane.org; Wed, 04 Dec 2013 12:35:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoGLs-0001PE-4J for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2013 12:35:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoGLn-0003Yn-0h for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2013 12:35:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44241) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoGLm-0003Yb-UT for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2013 12:35:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VoGLm-00049L-Cm for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2013 12:35:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Dec 2013 17:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16048 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16048-submit@debbugs.gnu.org id=B16048.138617848415922 (code B ref 16048); Wed, 04 Dec 2013 17:35:02 +0000 Original-Received: (at 16048) by debbugs.gnu.org; 4 Dec 2013 17:34:44 +0000 Original-Received: from localhost ([127.0.0.1]:58258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VoGLU-00048j-48 for submit@debbugs.gnu.org; Wed, 04 Dec 2013 12:34:44 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:48390) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VoGLR-00048Y-8e for 16048@debbugs.gnu.org; Wed, 04 Dec 2013 12:34:42 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MXA00K00M0MBJ00@a-mtaout20.012.net.il> for 16048@debbugs.gnu.org; Wed, 04 Dec 2013 19:34:40 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MXA00KXUM5R6I30@a-mtaout20.012.net.il>; Wed, 04 Dec 2013 19:34:40 +0200 (IST) In-reply-to: <878uw0ogoj.fsf@gmx.de> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:81378 Archived-At: > From: Michael Albinus > Date: Wed, 04 Dec 2013 15:05:00 +0100 > Cc: 16048-done@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".