bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2878: marked as done (bindat-pack returns unibyte string for emacs


From: Emacs bug Tracking System
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

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 string  
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.)


-- 
2878: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2878
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems
--- Begin Message --- Subject: bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23 Date: Fri, 3 Apr 2009 23:20:56 +0800
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



--- End Message ---
--- Begin Message --- Subject: Re: bug#2878: Acknowledgement (bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23) Date: Sun, 03 May 2009 21:18:02 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)
Miles Bader <miles@gnu.org> 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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]