help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: set input/output coding system for term-mode


From: William Xu
Subject: Re: set input/output coding system for term-mode
Date: Wed, 13 Jun 2007 17:52:19 +0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Peter Dyballa <Peter_Dyballa@Web.DE> writes:

   Am 13.06.2007 um 10:51 schrieb William Xu:

   >    each with a different encoding,
   >
   > Isn't this my original problem?

   No – as far as I understood. You wanted to change the single buffer's
   encoding "on-the-fly," having in it segments in encoding a or  encoding
   b or encoding c or ...

   Check whether there is a hook that can set the encoding for a *shell*
   or *terminal* buffer when it is created and give it a unique name, too.

It doesn't matter whether it can be set "on-the-fly" or not. i will
simply have one single *terminal* buffer. *terminal* has a
term-setup-hook, i add the following to it:

,----
| (defun xwl-term-setup-hook ()
|   (set-buffer-process-coding-system 'gb2312 'gb2312)
|   (set-buffer-file-coding-system 'gb2312 'gb2312)
|   (set-terminal-coding-system 'gb2312))
| 
| (add-hook 'term-setup-hook 'xwl-term-setup-hook)
`----

But still without luck..

-- 
William





reply via email to

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