GNU bug report logs - #2878
bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23

Previous Next

Package: emacs;

Reported by: Yee Keat Phuah <ykphuah <at> gmail.com>

Date: Fri, 3 Apr 2009 15:25:05 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 2878-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Miles Bader <miles <at> gnu.org>
Cc: Yee Keat Phuah <ykphuah <at> gmail.com>, 2878-done <at> debbugs.gnu.org
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
Miles Bader <miles <at> 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.




This bug report was last modified 16 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.