From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: [schwab@suse.de: Text mode Emacs in multibyte terminal] Date: Wed, 07 Dec 2005 16:34:21 +0900 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1133941006 20107 80.91.229.2 (7 Dec 2005 07:36:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 7 Dec 2005 07:36:46 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 07 08:36:44 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ejtqn-0002xb-8B for ged-emacs-devel@m.gmane.org; Wed, 07 Dec 2005 08:36:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ejtr0-0004JH-4g for ged-emacs-devel@m.gmane.org; Wed, 07 Dec 2005 02:36:42 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EjtpW-0004Iu-PA for emacs-devel@gnu.org; Wed, 07 Dec 2005 02:35:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EjtpT-0004Ii-JG for emacs-devel@gnu.org; Wed, 07 Dec 2005 02:35:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EjtpS-0004If-SI for emacs-devel@gnu.org; Wed, 07 Dec 2005 02:35:06 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EjtqB-0006Yn-1w; Wed, 07 Dec 2005 02:35:51 -0500 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.13.4/8.13.4/Debian-3) with ESMTP id jB77YN91004668; Wed, 7 Dec 2005 16:34:23 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.13.4/8.13.4/Debian-3) with ESMTP id jB77YNG7006753; Wed, 7 Dec 2005 16:34:23 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1Ejtoj-0002JI-00; Wed, 07 Dec 2005 16:34:21 +0900 Original-To: rms@gnu.org, schwab@suse.de, emacs-devel@gnu.org In-reply-to: (message from Richard Stallman on Fri, 02 Dec 2005 13:20:50 -0500) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:47100 Archived-At: In article , Richard Stallman writes: > I am not sure whether this is a bug. Would you please DTRT and ack? > ------- Start of forwarded message ------- > From: Andreas Schwab > To: emacs-devel@gnu.org > Subject: Text mode Emacs in multibyte terminal [...] > When running a text mode Emacs in a multibyte environment (eg. utf8 xterm > with LANG=de_DE.UTF-8), and visiting a binary file (like /bin/true) you > get a garbled screen. The problem is that all non-control characters are > written verbatim to the terminal as if it were single-byte encoded. Even > setting the buffer to multibyte and the terminal coding system to utf-8 > doesn't help. The only way to get a correct display is to load the file > with a forced coding system of utf-8 or some single-byte coding system. Thank you for the bug report. This is because standard-display-table is setup for Latin-1 environment even if your locale de_DE.UTF-8. I've just installed the attached fix. --- Kenichi Handa handa@m17n.org 2005-12-07 Kenichi Handa * international/mule-cmds.el (set-display-table-and-terminal-coding-system): If the coding system specified in `unibyte-display' property is different from the arg coding-system, don't setup standard-display-table. Index: mule-cmds.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/international/mule-cmds.el,v retrieving revision 1.288 retrieving revision 1.289 diff -c -r1.288 -r1.289 *** mule-cmds.el 5 Dec 2005 07:38:44 -0000 1.288 --- mule-cmds.el 7 Dec 2005 07:27:28 -0000 1.289 *************** *** 1798,1804 **** (defun set-display-table-and-terminal-coding-system (language-name &optional coding-system) "Set up the display table and terminal coding system for LANGUAGE-NAME." (let ((coding (get-language-info language-name 'unibyte-display))) ! (if coding (standard-display-european-internal) ;; The following 2 lines undo the 8-bit display that we set up ;; in standard-display-european-internal, which see. This is in --- 1798,1806 ---- (defun set-display-table-and-terminal-coding-system (language-name &optional coding-system) "Set up the display table and terminal coding system for LANGUAGE-NAME." (let ((coding (get-language-info language-name 'unibyte-display))) ! (if (and coding ! (or (not coding-system) ! (coding-system-equal coding coding-system))) (standard-display-european-internal) ;; The following 2 lines undo the 8-bit display that we set up ;; in standard-display-european-internal, which see. This is in