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

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

bug#2878: Acknowledgement (bindat-pack returns unibyte string for emacs


From: Miles Bader
Subject: bug#2878: Acknowledgement (bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23)
Date: Mon, 4 May 2009 07:28:23 +0900

2009/5/3 Chong Yidong <cyd@stupidchicken.com>:
> Miles, could I verify that this patch is correct, and should be checked
> in?
>
>> snogglethorpe from #emacs have suggested this patch and it worked for
>> my elisp code
>
>> --- a/lisp/emacs-lisp/bindat.el
>> +++ b/lisp/emacs-lisp/bindat.el

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

-Miles

-- 
Do not taunt Happy Fun Ball.






reply via email to

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