Interactive tools: Escape control character for Unicode output
authorPierre Le Marre <dev@wismill.eu>
Mon, 18 Sep 2023 09:59:30 +0000 (11:59 +0200)
committerWismill <dev@wismill.eu>
Mon, 18 Sep 2023 14:14:12 +0000 (16:14 +0200)
commit44029221e8423f1ca93470952542a0517a208d42
tree8b0828216663f4a32c29d06a00749d3ba822e754
parentcf228acd26b8798e077ae83b5a1351af0b78a287
Interactive tools: Escape control character for Unicode output

Currently the interactive tools print the string result of key strokes
as it is, without any escape. This is especially annoying for trivial
keysyms such as: Return, BackSpace and Escape.

Fix this by displaying the Unicode code point notation (e.g U+000D for
Return) for single control characters from the C0 set and DEL.

This is a hack: ideally we would like to escape any non-printable
character in the utf-8 string.
tools/tools-common.c