From 7c48fc2fb30cf13ff5075c6d0ef78a38e07f8dd2 Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Tue, 6 Feb 2007 23:25:17 +0000 Subject: [PATCH] Amend check for non printable chars to filter control chars 80-9F in an utf8 locale, bug #460. Note: this was and is still broken with koi8-r. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4413 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/gui-entry.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fe-text/gui-entry.c b/src/fe-text/gui-entry.c index 7dcec358..63813af3 100644 --- a/src/fe-text/gui-entry.c +++ b/src/fe-text/gui-entry.c @@ -232,11 +232,11 @@ static void gui_entry_draw_from(GUI_ENTRY_REC *entry, int pos) if (entry->hidden) term_addch(root_window, ' '); - else if (*p >= 32 && (entry->utf8 || (*p & 127) >= 32)) + else if (*p >= 32 && (*p < 0x7F || *p > 0x9F)) term_add_unichar(root_window, *p); else { term_set_color(root_window, ATTR_RESET|ATTR_REVERSE); - term_addch(root_window, *p+'A'-1); + term_addch(root_window, (*p & 127)+'A'-1); term_set_color(root_window, ATTR_RESET); } }