unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [schwab@suse.de: Text mode Emacs in multibyte terminal]
       [not found] <E1EiFWc-0003RO-QJ@fencepost.gnu.org>
@ 2005-12-07  7:34 ` Kenichi Handa
  0 siblings, 0 replies; only message in thread
From: Kenichi Handa @ 2005-12-07  7:34 UTC (permalink / raw)


In article <E1EiFWc-0003RO-QJ@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes:
> I am not sure whether this is a bug.  Would you please DTRT and ack?

> ------- Start of forwarded message -------
> From: Andreas Schwab <schwab@suse.de>
> 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  <handa@m17n.org>

	* 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-07  7:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <E1EiFWc-0003RO-QJ@fencepost.gnu.org>
2005-12-07  7:34 ` [schwab@suse.de: Text mode Emacs in multibyte terminal] Kenichi Handa

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).