From 0d9be10fe4aa6c460d115ad05cdac8f393d2c47f Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Thu, 17 May 2007 11:10:14 +0300 Subject: [PATCH] UTF-8, update_screen_driver: A small rearrangement. This does not change the behaviour but will help later changes. --- src/terminal/screen.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/terminal/screen.c b/src/terminal/screen.c index 0c762fa3..78d73c51 100644 --- a/src/terminal/screen.c +++ b/src/terminal/screen.c @@ -241,14 +241,15 @@ static INIT_LIST_HEAD(active_screen_drivers); static void update_screen_driver(struct screen_driver *driver, struct option *term_spec) { + int utf8_io = get_opt_bool_tree(term_spec, "utf_8_io"); + #ifdef CONFIG_UTF8 /* Force UTF-8 I/O if the UTF-8 charset is selected. Various * places assume that the terminal's charset is unibyte if * UTF-8 I/O is disabled. (bug 827) */ - driver->utf8 = get_opt_bool_tree(term_spec, "utf_8_io") - || is_cp_utf8(get_opt_codepage_tree(term_spec, "charset")); -#else - int utf8_io = get_opt_bool_tree(term_spec, "utf_8_io"); + if (is_cp_utf8(get_opt_codepage_tree(term_spec, "charset"))) + utf8_io = 1; + driver->utf8 = utf8_io; #endif /* CONFIG_UTF8 */ driver->color_mode = get_opt_int_tree(term_spec, "colors");