From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: owner@emacsbugs.donarmstrong.com (Emacs bug Tracking System) Newsgroups: gmane.emacs.bugs Subject: bug#2878: marked as done (bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23) Date: Mon, 04 May 2009 01:25:04 +0000 Message-ID: References: <87vdohoed1.fsf@cyd.mit.edu> <9caafe030904030820i4dbda89coc97dc2066f8b1a05@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_1241400304-13351-0" X-Trace: ger.gmane.org 1241400736 7200 80.91.229.12 (4 May 2009 01:32:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 May 2009 01:32:16 +0000 (UTC) To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 04 03:32:06 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M0n2M-0000JP-0g for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 May 2009 03:32:06 +0200 Original-Received: from localhost ([127.0.0.1]:52670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0n2L-0001ro-68 for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 May 2009 21:32:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0n2G-0001rZ-4C for bug-gnu-emacs@gnu.org; Sun, 03 May 2009 21:32:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0n2B-0001oH-Ib for bug-gnu-emacs@gnu.org; Sun, 03 May 2009 21:31:59 -0400 Original-Received: from [199.232.76.173] (port=46155 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0n2B-0001o9-BI for bug-gnu-emacs@gnu.org; Sun, 03 May 2009 21:31:55 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:43658) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M0n2A-0001pa-OU for bug-gnu-emacs@gnu.org; Sun, 03 May 2009 21:31:55 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n441VqWa015917; Sun, 3 May 2009 18:31:52 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n441P4Eq013439; Sun, 3 May 2009 18:25:04 -0700 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: closed 2878 X-Emacs-PR-Package: emacs X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:27666 Archived-At: This is a multi-part message in MIME format... ------------=_1241400304-13351-0 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Your message dated Sun, 03 May 2009 21:18:02 -0400 with message-id <87vdohoed1.fsf@cyd.mit.edu> and subject line Re: bug#2878: Acknowledgement (bindat-pack returns unibyte= string for emacs 22 but multibyte string for emacs 23) has caused the Emacs bug report #2878, regarding bindat-pack returns unibyte string for emacs 22 but multibyte str= ing for emacs 23 to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) --=20 2878: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3D2878 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems ------------=_1241400304-13351-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 3 Apr 2009 15:21:03 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n33FL0TO028392 for ; Fri, 3 Apr 2009 08:21:01 -0700 Received: from mx10.gnu.org ([199.232.76.166]:53855) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LplCV-0000mS-P4 for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 11:20:59 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LplCV-0005YY-1v for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 11:20:59 -0400 Received: from wf-out-1314.google.com ([209.85.200.169]:36954) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LplCU-0005YA-Kc for emacs-pretest-bug@gnu.org; Fri, 03 Apr 2009 11:20:58 -0400 Received: by wf-out-1314.google.com with SMTP id 23so1177742wfg.24 for ; Fri, 03 Apr 2009 08:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=2g05pV+FZCIol6+bjm7shkrdPYywWL/qYDxe1oDO600=; b=F0UIiRwi1kGEDeUC7FWMkoPxxh6y8pzDgaBlEc5huYuSQQnHXGUbX95OghHq0+OPsR ZgGxB3bzRlBlUWxRt72DclQMhfsPNbZCz6hD8X5UYkYdi8QHuPutvnQBz54Y+4uPdGz5 opd0RGJ1VA+ZoXRmnooR6DuE8lMrNOYYq8FVU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=xvQfQ+HjV6i0dLfAxTDICHL9fkRCDhAIvn6nfsvZohEgcq/o7Qc5GF1RAv1NnMSMfK XK3UbbS/x6W2EDHLRKM9S6TZmmYB7H4zMSi8ScfNq/2pgg/gB8+zaGNnLxU6eP3cFJZR 6ofzMeT8fKpyVhgHr3kIn2d2XITf+fy+cJN6o= MIME-Version: 1.0 Received: by 10.142.185.13 with SMTP id i13mr365510wff.36.1238772056391; Fri, 03 Apr 2009 08:20:56 -0700 (PDT) Date: Fri, 3 Apr 2009 23:20:56 +0800 Message-ID: <9caafe030904030820i4dbda89coc97dc2066f8b1a05@mail.gmail.com> Subject: bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23 From: Yee Keat Phuah To: emacs-pretest-bug@gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Hi, This piece of code returned nil on emacs 22 and t on emacs 23. (let* ((spec `((:method-id vec 4))) (data `((:ref-type . ,(vector #x00 #x00 #x00 #x00 #x00 #x00 #x00 #x39)) (:method-id . ,(vector #x09 #x90 #xec #xd8)))) (packed (bindat-pack spec data))) (multibyte-string-p packed)) And because of it being multibyte, when i want to send it over the wire to a sub process in a binary data format, it gets transformed and the sub process does not get a byte-by-byte equivalent of the concatenation of the 2 vectors above. I have tried using string-as-unibyte and the effect is still the same. -- Cheers, Phuah Yee Keat ------------=_1241400304-13351-0 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 2878-done) by emacsbugs.donarmstrong.com; 4 May 2009 01:18:00 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n441Ht4U011910 for <2878-done@emacsbugs.donarmstrong.com>; Sun, 3 May 2009 18:17:57 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 5C01A57E246; Sun, 3 May 2009 21:18:02 -0400 (EDT) From: Chong Yidong To: Miles Bader Cc: Yee Keat Phuah , 2878-done@emacsbugs.donarmstrong.com Subject: Re: bug#2878: Acknowledgement (bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23) References: <87preqqm1m.fsf@cyd.mit.edu> Date: Sun, 03 May 2009 21:18:02 -0400 In-Reply-To: (Miles Bader's message of "Mon, 4 May 2009 07:28:23 +0900") Message-ID: <87vdohoed1.fsf@cyd.mit.edu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Miles Bader writes: > I think it should be checked in. I don't have intimate familiarity > with this code, but I did look at the problem and make the patch. > > The other code in the file stores numerical values into the > `bindat-raw' using aset, and then wants to return the whole thing as a > unicode string containing those byte values. The old code made a > vector, stored into it, and turned the vector into a string using > `concat' -- however that ends up making a _multibyte_ string (I don't > know whether this is a bug in concat or not). The new method of > making a string initially and storing directly into it results in a > unibyte string, which is what is desired (this method is also more > efficient). OK, I've checked in your fix. Thanks. ------------=_1241400304-13351-0--