emacs-devel
[Top][All Lists]
Advanced

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

Re: yet more term.el fixes #2


From: Stefan
Subject: Re: yet more term.el fixes #2
Date: Thu, 23 Sep 2004 07:44:50 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (darwin)

>> > (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




reply via email to

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