]> granicus.if.org Git - procps-ng/commit
top: enable processing utf8 multi-byte character input
authorJim Warner <james.warner@comcast.net>
Mon, 13 Jun 2022 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Tue, 14 Jun 2022 11:52:13 +0000 (21:52 +1000)
commitc20fef1d7dc92a41574797b7de81a37c5d7aeb92
tree2db852456c5e778cefadafb76997a6e33190feb8
parent970a3dc99091a08d64ed2500a536ea101f6f425e
top: enable processing utf8 multi-byte character input

This program was well equipped to properly handle utf8
multi-byte characters - except for one important area!

If users typed any unicode character (shift+ctrl+u) or
pasted a utf-8 multi-byte string as a response to some
input prompt, those characters would simply be ignored
since they would not pass the internal 'isprint' test.

Well, now we can handle such data while preserving all
line editing provisions such as insertions, deletions,
destructive backspace, prior line recall (up/down) and
those all important cursor left plus right arrow keys.

[ we even support overtype mode for multi-byte stuff ]
[ even though our gui emulator will not let us alter ]
[ the cursor as confirmation (as we do at a console) ]

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c