emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Text mode Emacs in multibyte terminal]


From: Kenichi Handa
Subject: Re: address@hidden: Text mode Emacs in multibyte terminal]
Date: Wed, 07 Dec 2005 16:34:21 +0900
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)

In article <address@hidden>, Richard Stallman <address@hidden> writes:
> I am not sure whether this is a bug.  Would you please DTRT and ack?

> ------- Start of forwarded message -------
> From: Andreas Schwab <address@hidden>
> To: address@hidden
> 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
address@hidden

2005-12-07  Kenichi Handa  <address@hidden>

        * 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




reply via email to

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