From: Stefan <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org, Miles Bader <miles@gnu.org>
Subject: Re: yet more term.el fixes #2
Date: Thu, 23 Sep 2004 07:44:50 -0400 [thread overview]
Message-ID: <m1wtylw6yt.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <200409230214.i8N2E4GK024796@scanner2.ics.uci.edu> (Dan Nicolaescu's message of "Wed, 22 Sep 2004 19:14:02 -0700")
>> > (insert (string-as-unibyte (substring str i funny)))
>>
>> I think string-as-unibyte is also an extremely poor choice here and will
>> likely lead to unexpected errors in some cases (it's a function that should
>> have big warning signs all around it, like string-as-multibyte).
>>
>> Also calling set-buffer-multibyte is to be avoided if possible.
>>
>> Can you try with
>>
>> (insert (decode-coding-string (substring str i funny) locale-coding-system))
>> Also based on your above code, it seems that `str' is a multibyte string,
>> which sounds wrong. I think that the coding-system used for the process's
>> output should be `binary'. Can you see what coding-system is used for
>> the process?
> In term-exec-1:
> (coding-system-for-read 'unknown-unix)
Sorry I miss that term-exec-1.
Please add to my previous patch the one below.
> Did not work.
What did it do?
> It can be made work by binding:
> (default-enable-multibyte-characters t)
> when creating the buffer in make-term (so as to do what
> set-buffer-multibyte used to do)
But fiddling with enable-multibyte-characters is only ever going to hide
the bug.
Stefan
next prev parent reply other threads:[~2004-09-23 11:44 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
2004-09-22 20:23 ` Stefan Monnier
2004-09-23 2:14 ` Dan Nicolaescu
2004-09-23 11:44 ` Stefan [this message]
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=m1wtylw6yt.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--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.