From 54bbfee30e92f7aa8fa7b241e4c7c444087111f0 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Mon, 4 Jan 2021 17:21:48 +0800 Subject: [PATCH] system/readline: check the control ascii only to support multi-languages Signed-off-by: chao.an --- system/readline/readline_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/readline/readline_common.c b/system/readline/readline_common.c index 13750fe8e..413767ab4 100644 --- a/system/readline/readline_common.c +++ b/system/readline/readline_common.c @@ -733,11 +733,11 @@ ssize_t readline_common(FAR struct rl_common_s *vtbl, FAR char *buf, return nch; } - /* Otherwise, check if the character is printable and, if so, put the - * character in the line buffer + /* Otherwise, put the character in the line buffer if the + * character is not a control byte */ - else if (isprint(ch)) + else if (!iscntrl(ch & 0xff)) { buf[nch++] = ch;