unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yee Keat Phuah <ykphuah@gmail.com>
To: emacs-pretest-bug@gnu.org
Subject: bug#2878: bindat-pack returns unibyte string for emacs 22 but multibyte string for emacs 23
Date: Fri, 3 Apr 2009 23:20:56 +0800	[thread overview]
Message-ID: <9caafe030904030820i4dbda89coc97dc2066f8b1a05@mail.gmail.com> (raw)

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






             reply	other threads:[~2009-04-03 15:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87vdohoed1.fsf@cyd.mit.edu>
2009-04-03 15:20 ` Yee Keat Phuah [this message]
     [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
2009-05-04  1:25   ` bug#2878: marked as done " Emacs bug Tracking System

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=9caafe030904030820i4dbda89coc97dc2066f8b1a05@mail.gmail.com \
    --to=ykphuah@gmail.com \
    --cc=2878@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    /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).