zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.42k stars 1.16k forks source link

micro does not show ASCII control characters (0x00 to 0x1F) #3163

Open jnko opened 4 months ago

jnko commented 4 months ago

micro does not show ASCII control characters (0x00 to 0x1F)

I've had a lot of "fun" finding a configuration file syntax error and it turned out that the file contained accidentally an ASCII control character (0x00 to 0x1F) which micro simply ignores to display.

Instead of ignoring those unprintable characters micro should show them like "^CHAR"

0x00  - ^@
0x01  - ^A
0x02  - ^B
...
0x1B  - ^[
0x1C - ^\
0x1D  - ^]
0x1E  - ^^
0x1F  - ^-