diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-04-16 22:50:02 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-04-16 22:50:39 -0700 |
commit | 1cad61030160ebc4b73e1f4212155a180d417be3 (patch) | |
tree | e53951bfa6f579c3f7c92f01d95ddec3f76bf6fa /src/terminal.c | |
parent | c68cce94c46140f2ad1411550427d3cc2658ec02 (diff) |
Work around bug with unibyte Linux consoles
* src/terminal.c (terminal_glyph_code): Skip the UTF-8 stuff if
the terminal's coding system is unibyte (Bug#26396).
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c index 0b1cbe7b791..3d25b36fa56 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -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. */ |