From: Dan Nicolaescu <dann@ics.uci.edu>
Cc: emacs-devel@gnu.org, Miles Bader <miles@gnu.org>
Subject: Re: yet more term.el fixes #2
Date: Wed, 22 Sep 2004 10:43:25 -0700 [thread overview]
Message-ID: <200409221743.i8MHhSGK020804@scanner2.ics.uci.edu> (raw)
In-Reply-To: <jwvoejy4faz.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 22 Sep 2004 09:16:46 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > When simply inserting raw character values in to the buffer, it seems
> > that some sort of default decoding takes place at insert/display time,
>
> Yes, `insert' says it uses string-make-multibyte which itself uses
> unibyte-char-to-multibyte.
>
> By the way, `insert' also says "if you want to preserve binary data as
> binary, use string-as-multibyte", shouldn't that be "string-TO-multibyte"?
Well, I managed to make it work, I needed to add:
(set-buffer-multibyte t)
to `term-mode'
and change the (insert (substring str i funny)) call in
`term-emulate-terminal' to:
(insert (string-as-unibyte (substring str i funny)))
This works with both:
EMACS_UNIBYTE=1 emacs
EMACS_UNIBYTE=0 emacs
One way to test it is to run lynx www.emacswiki.org in the term.el
terminal and check that the language names are printed correctly.
I don't know if the above changes are strictly correct, so I'd
appreciate is somebody could confirm it.
Thanks.
--dan
next prev parent reply other threads:[~2004-09-22 17:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-22 3:17 yet more term.el fixes #2 Dan Nicolaescu
2004-09-22 3:42 ` Miles Bader
2004-09-22 4:18 ` Dan Nicolaescu
2004-09-22 4:47 ` Miles Bader
2004-09-22 13:16 ` Stefan Monnier
2004-09-22 17:43 ` Dan Nicolaescu [this message]
2004-09-22 20:23 ` Stefan Monnier
2004-09-23 2:14 ` Dan Nicolaescu
2004-09-23 11:44 ` Stefan
2004-09-23 21:28 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200409221743.i8MHhSGK020804@scanner2.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
--cc=miles@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.