On Fri, Aug 26, 2022 at 11:11:38AM -0500, Noel Jones wrote: > Therefore unprintable characters - which have the greatest possibility > of breaking things yet are easily filtered - are replaced in the log > with "?" for safety.
If there were sufficient compelling interest, we could consider using strnvisx(3) or similar to sanitise log messages in a lossless manner (modulo truncation of long fragments). However, the vis(3) family of functions are BSD C library interfaces that are optional on Linux systems, where e.g. in Fedora one would need to install the optional "libbsd-devel" at compile time, and optional "libbsd" at runtime. Knowing the actual garbage characters sent is sometimes useful, but likely not often enough to warrant much effort in that direction. -- Viktor.