From a353a36fcf1e454bdd60311bf40c7856b007e1dc Mon Sep 17 00:00:00 2001 From: Jan Max Meyer Date: Sat, 6 Apr 2024 11:49:22 +0200 Subject: [PATCH] Detect ISO-8859-1 bytes as well --- targets/C.source/fn.getinput.c | 4 ++-- targets/c.tlt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/targets/C.source/fn.getinput.c b/targets/C.source/fn.getinput.c index 76f583a..35563cd 100644 --- a/targets/C.source/fn.getinput.c +++ b/targets/C.source/fn.getinput.c @@ -3,9 +3,9 @@ UNICC_STATIC UNICC_CHAR _get_char( _pcb* pcb ) { unsigned char first = UNICC_GETCHAR( pcb ); - if ((first & 0x80) == 0) + if ((first & 0x80) == 0 || first >= 0x80) { - // Single-byte ASCII character + // Single-byte ASCII character (probably ISO-8859-1) return first; } else if ((first & 0xE0) == 0xC0) diff --git a/targets/c.tlt b/targets/c.tlt index 5617477..9e16fd6 100644 --- a/targets/c.tlt +++ b/targets/c.tlt @@ -1028,9 +1028,9 @@ UNICC_STATIC UNICC_CHAR _get_char( _pcb* pcb ) { unsigned char first = UNICC_GETCHAR( pcb ); - if ((first & 0x80) == 0) + if ((first & 0x80) == 0 || first >= 0x80) { - // Single-byte ASCII character + // Single-byte ASCII character (probably ISO-8859-1) return first; } else if ((first & 0xE0) == 0xC0)