From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#16048: 24.3.50; String compare surprise Date: Thu, 05 Dec 2013 20:22:08 +0100 Message-ID: <878uvz3xy7.fsf@gmx.de> References: <87r49six1s.fsf@igel.home> <878uw0ogoj.fsf@gmx.de> <83zjog34gi.fsf@gnu.org> <87vbz3ybua.fsf@gmx.de> <83k3fj2o5w.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1386271392 4861 80.91.229.3 (5 Dec 2013 19:23:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Dec 2013 19:23:12 +0000 (UTC) Cc: 16048@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Dec 05 20:23:17 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 1VoeW4-0002ll-IH for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Dec 2013 20:23:16 +0100 Original-Received: from localhost ([::1]:55353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoeW4-0008JW-46 for geb-bug-gnu-emacs@m.gmane.org; Thu, 05 Dec 2013 14:23:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoeVv-0008JO-Pa for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2013 14:23:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoeVq-0005oA-7e for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2013 14:23:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46332) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoeVq-0005o6-43 for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2013 14:23:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VoeVp-0004ft-Ue for bug-gnu-emacs@gnu.org; Thu, 05 Dec 2013 14:23:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 Dec 2013 19:23:01 +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.138627134917932 (code B ref 16048); Thu, 05 Dec 2013 19:23:01 +0000 Original-Received: (at 16048) by debbugs.gnu.org; 5 Dec 2013 19:22:29 +0000 Original-Received: from localhost ([127.0.0.1]:60351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VoeVI-0004f9-6V for submit@debbugs.gnu.org; Thu, 05 Dec 2013 14:22:28 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:54167) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VoeVF-0004ez-VR for 16048@debbugs.gnu.org; Thu, 05 Dec 2013 14:22:27 -0500 Original-Received: from detlef.gmx.de ([87.146.37.149]) by mail.gmx.com (mrgmx002) with ESMTPS (Nemesis) id 0MXZw6-1W3S3d3Pbq-00WYBU for <16048@debbugs.gnu.org>; Thu, 05 Dec 2013 20:22:24 +0100 In-Reply-To: (Stefan Monnier's message of "Thu, 05 Dec 2013 14:11:11 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Provags-ID: V03:K0:P8P55gXn6Pd6H8b6OJKu+f/arWXGjVHxOM8mdFbvj+IqlEqtYJ6 NGaj0wWLbgGCA6M08KQWmPYZcY9jkkNm8Rb/Qcf0/qNbmerZrg4pKnqMLvyAdyz5IVGZCgG JKHvxjF5GiB2V/iPrqnK5mxcYkA7y7ZFJzISRcABjJmdCj8HoxBfHQBiSOxZBEoNMDN7iZf QRGt7ThnkLNlDALeRoQGw== 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:81462 Archived-At: Stefan Monnier writes: >> 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. We are speaking about functions of dbus.el, which convert a string into something with a C-style identifier syntax, and back. Nothing I would expect to be a multibyte string in real life. (Agreed, my example looks strange, but this is for the hard test in dbus-tests.el) > Of course, if your string can contain a mix of bytes and chars, you > don't have a choice. For the other function in dbus.el, which handles arrays of bytes (often used to marshall whatever strings are on the wire) I've added earlier today the possiblity to encode them as unibyte or multibyte. As above, the function `dbus-byte-array-to-string' cannot decide itself how to interpret the bytestream, so the caller is requested to decide. > Stefan Best regards, Michael.