]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around bug with unibyte Linux consoles
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 17 Apr 2017 05:50:02 +0000 (22:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 17 Apr 2017 05:50:39 +0000 (22:50 -0700)
* src/terminal.c (terminal_glyph_code): Skip the UTF-8 stuff if
the terminal's coding system is unibyte (Bug#26396).

src/terminal.c

index 0b1cbe7b7913bd004036b5e1f430dcd79f5f444b..3d25b36fa565e661f437d2fbd212a9139b286504 100644 (file)
@@ -575,7 +575,9 @@ Lisp_Object
 terminal_glyph_code (struct terminal *t, int ch)
 {
 #if HAVE_STRUCT_UNIPAIR_UNICODE
-  if (t->type == output_termcap)
+  /* Heuristically assume that a terminal supporting glyph codes is in
+     UTF-8 mode if and only if its coding system is multibyte (Bug#26396).  */
+  if (t->type == output_termcap && t->terminal_coding->src_multibyte)
     {
       /* As a hack, recompute the table when CH is the maximum
         character.  */