unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: Yee Keat Phuah <ykphuah@gmail.com>, 2878@emacsbugs.donarmstrong.com
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	[thread overview]
Message-ID: <fc339e4a0905031528l50d9d347i986ce1aaded749c@mail.gmail.com> (raw)
In-Reply-To: <87preqqm1m.fsf@cyd.mit.edu>

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	other threads:[~2009-05-03 22:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03 14:49 bug#2878: Acknowledgement (bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23) Chong Yidong
2009-05-03 22:28 ` Miles Bader [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-04-03 15:20 bug#2878: bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23 Yee Keat Phuah
     [not found] ` <handler.2878.B.123877206328398.ack@emacsbugs.donarmstrong.com>
2009-04-03 16:01   ` bug#2878: Acknowledgement (bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23) Yee Keat Phuah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc339e4a0905031528l50d9d347i986ce1aaded749c@mail.gmail.com \
    --to=miles@gnu.org \
    --cc=2878@emacsbugs.donarmstrong.com \
    --cc=cyd@stupidchicken.com \
    --cc=ykphuah@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).