diff options
author | Paul Eggert <eggert@Penguin.CS.UCLA.EDU> | 2017-04-17 10:19:39 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-04-17 10:20:39 -0700 |
commit | 932698b7891668318ba9ca93375d8d27d52a07f5 (patch) | |
tree | d70172f4f246978a31460b68a95f1ac69bb1ebc5 /src/terminal.c | |
parent | 09eaf661eb6ea49c6324d8819a872c523133dc2b (diff) | |
download | emacs-932698b7891668318ba9ca93375d8d27d52a07f5.tar.gz |
Tighten recently-added UTF-8 check
* src/coding.c (encode_coding_utf_8): Now extern.
* src/terminal.c (terminal_glyph_code) [HAVE_STRUCT_UNIPAIR_UNICODE]:
Check for UTF-8, not just for multibyte.
Diffstat (limited to 'src/terminal.c')
-rw-r--r-- | src/terminal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/terminal.c b/src/terminal.c index 3d25b36fa56..367f2ac7192 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -576,8 +576,9 @@ terminal_glyph_code (struct terminal *t, int ch) { #if HAVE_STRUCT_UNIPAIR_UNICODE /* 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) + UTF-8 mode if and only if its coding system is UTF-8 (Bug#26396). */ + if (t->type == output_termcap + && t->terminal_coding->encoder == encode_coding_utf_8) { /* As a hack, recompute the table when CH is the maximum character. */ |