mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Bug 914: Add terminal.utf8_cp, not yet read.
This commit is contained in:
parent
774471b6d1
commit
ad669a3f0f
src/terminal
@ -182,11 +182,13 @@ check_terminal_name(struct terminal *term, struct terminal_info *info)
|
||||
/* Probably not best place for set this. But now we finally have
|
||||
* term->spec and term->utf8 should be set before decode session info.
|
||||
* --Scrool */
|
||||
term->utf8_cp = is_cp_utf8(get_opt_codepage_tree(term->spec,
|
||||
"charset"));
|
||||
/* 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) */
|
||||
term->utf8 = get_opt_bool_tree(term->spec, "utf_8_io")
|
||||
|| is_cp_utf8(get_opt_codepage_tree(term->spec, "charset"));
|
||||
term->utf8 = term->utf8_cp
|
||||
|| get_opt_bool_tree(term->spec, "utf_8_io");
|
||||
#endif /* CONFIG_UTF8 */
|
||||
}
|
||||
|
||||
|
@ -360,6 +360,7 @@ add_screen_driver(enum term_mode_type type, struct terminal *term, int env_len)
|
||||
|
||||
#ifdef CONFIG_UTF8
|
||||
term->utf8 = use_utf8_io(driver);
|
||||
term->utf8_cp = driver->opt.utf8_cp;
|
||||
#endif /* CONFIG_UTF8 */
|
||||
|
||||
return driver;
|
||||
@ -382,6 +383,7 @@ get_screen_driver(struct terminal *term)
|
||||
|
||||
#ifdef CONFIG_UTF8
|
||||
term->utf8 = use_utf8_io(driver);
|
||||
term->utf8_cp = driver->opt.utf8_cp;
|
||||
#endif /* CONFIG_UTF8 */
|
||||
return driver;
|
||||
}
|
||||
|
@ -127,6 +127,9 @@ struct terminal {
|
||||
unsigned int master:1;
|
||||
|
||||
#ifdef CONFIG_UTF8
|
||||
/* Indicates whether the charset of the terminal is UTF-8. */
|
||||
unsigned int utf8_cp:1;
|
||||
|
||||
/* Indicates whether UTF-8 I/O is used. Forced on if the
|
||||
* UTF-8 charset is selected. (bug 827) */
|
||||
unsigned int utf8:1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user