I want to find a way to get a symbol of a non-printable character in c# (e.g. "SOH" for start of heading and "BS" for backspace). Any ideas?
Edit: I don't need to visualize a byte value of a non-printable character but it's code as shown here https://web.itu.edu.tr/sgunduz/courses/mikroisl/ascii.html
Example would be "NUL" for 0x00, "SOH" for 0x01 etc.
You, probably, are looking for a kind of string dump in order to visualize control characters. You can do it with a help of Regular Expressions where
\p{Cc}matches control symbol:Outcome:
Edit: If you want to visualize in a different way, you shoud edit lambda
For instance:
Demo:
Outcome: