From d9037cc4c3fcc838f00cb54db52d88c3192cb74e Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Fri, 1 Sep 2006 21:06:08 +0200 Subject: [PATCH] Small comment about UTF-8 detection. --- src/terminal/terminal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index f604e5c8..e9860a77 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -43,7 +43,10 @@ static void check_if_no_terminal(void); static int was_utf8(int in, int out) { - /* taken from setedit */ + /* Taken from setedit. + * Set cursor in the up left corner. Write "\357\200\240" == U+F020. + * Read cursor position. For UTF-8 x will be 2. + * For normal mode it will be 4. */ static unsigned char *str = "\033[1;1H\357\200\240\033[6n"; unsigned char buf[20]; int x, y;