From 2a73676490570520e6dbb3bc856b0710a645c2bd Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 3 May 2016 08:43:09 +0100 Subject: [PATCH] Support frontend_is_utf8() in all front ends. Previously only Unix front ends bothered to include it, on the basis that only the pty backend needed it (to set IUTF8 in the pty). We're about to need it everywhere else too. --- fuzzterm.c | 1 + windows/window.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/fuzzterm.c b/fuzzterm.c index 0da3b68d..21e7b12a 100644 --- a/fuzzterm.c +++ b/fuzzterm.c @@ -97,6 +97,7 @@ int is_iconic(void *frontend) { return 0; } void get_window_pos(void *frontend, int *x, int *y) { *x = 0; *y = 0; } void get_window_pixels(void *frontend, int *x, int *y) { *x = 0; *y = 0; } char *get_window_title(void *frontend, int icon) { return "moo"; } +int frontend_is_utf8(void *frontend) { return TRUE; } /* needed by timing.c */ void timer_change_notify(unsigned long next) { } diff --git a/windows/window.c b/windows/window.c index b1530dbc..290e6a31 100644 --- a/windows/window.c +++ b/windows/window.c @@ -229,6 +229,11 @@ void frontend_echoedit_update(void *frontend, int echo, int edit) { } +int frontend_is_utf8(void *frontend) +{ + return ucsdata.line_codepage == CP_UTF8; +} + char *get_ttymode(void *frontend, const char *mode) { return term_get_ttymode(term, mode);