Is there any console output sanitizer?

I am wondering if anyone knows about a console output sanitizer, that takes an output string and checks if it will be clear for a human sitting on a UTF-8 console what the string contains if it is printed on standard output or similar?

A Qwant search only turned up a filename sanitizer (sanitize-filename — Rust utility // Lib.rs). But thinking of characters like the one described at U+202E RIGHT-TO-LEFT OVERRIDE - Unicode Explorer (there are tons of such chars I guess), I have the strong feeling that many comandline programs could profit from such a sanitizer.

1 Like

I'm really interested in this too. Filtering out ASCII control characters and escape sequences is straightforward but it's a much hairier problem in the full unicode case.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.