From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: set input/output coding system for term-mode Date: Tue, 12 Jun 2007 11:24:13 +0200 Message-ID: <1CF3144D-DAE1-4B4F-8090-ACF1017DDF03@Web.DE> References: <87hcpd290s.fsf@www.williamxu.com> <87d50123fy.fsf@www.williamxu.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1181640298 14560 80.91.229.12 (12 Jun 2007 09:24:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 12 Jun 2007 09:24:58 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: William Xu Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jun 12 11:24:55 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Hy2cQ-0003XO-HY for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jun 2007 11:24:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hy2cP-0008TD-T7 for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Jun 2007 05:24:53 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hy2c1-0008T8-K2 for help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 05:24:29 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hy2bz-0008Sw-1X for help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 05:24:29 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hy2by-0008St-OH for help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 05:24:26 -0400 Original-Received: from fmmailgate01.web.de ([217.72.192.221]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Hy2by-0001Ug-Dn for help-gnu-emacs@gnu.org; Tue, 12 Jun 2007 05:24:26 -0400 Original-Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate01.web.de (Postfix) with ESMTP id 6126288F0AD9; Tue, 12 Jun 2007 11:24:21 +0200 (CEST) Original-Received: from [62.134.234.182] (helo=[192.168.1.2]) by smtp08.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.108 #197) id 1Hy2bt-0006wC-00; Tue, 12 Jun 2007 11:24:21 +0200 In-Reply-To: <87d50123fy.fsf@www.williamxu.com> X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX194yFpJ8UWTkHQVG09xltZqYWkG2cciDSV0UYt9 bCyodJIk8vYZJXAqonwnZBVxW720eO+FmC9jbYbkvxygPoVU5r SJC1LfPSMNvwdO0+/XUw== X-detected-kernel: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44911 Archived-At: Am 12.06.2007 um 06:37 schrieb William Xu: > Firstly, I have (prefer-coding-system 'utf-8) in .emacs. In *terminal* > buffer, suppose there's a file `foo' encoded with 'gb2312, at present > `cat foo' would display garbages, which is what i'm trying to solve. It does not work in any physical or emulated terminal to see the contents of a file which is not encoded in the terminal's default encoding in the file's proper encoding. Except this contents contains ANSI sequences to switch between character sets or writing directions. The question is why you want to do such a silly thing in GNU Emacs! You can easily visit the file in some buffer using the correct encoding ... And you can prefer a few coding systems. -- Greetings Pete Think of XML as Lisp for COBOL programmers. -- Tony-A (some guy on /.)