3 ms·
Interesting: https://man7.org/linux/man-pages/man4/console_codes.4.html https://man7.org/linux/man-pages/man4/console_codes.4.html I'll definitely need to add
by lunixbochs 6y ago
Interesting: https://man7.org/linux/man-pages/man4/console_codes.4.html https://man7.org/linux/man-pages/man4/console_codes.4.html
I'll definitely need to add support for that. Possibly annoying to strip that with utf8 involved. Any idea how many terminals support 0x9b?
- caf 6y agoWith UTF-8 you need to UTF-8 encode the 9b. For example this shows red on xfce4-terminal in UTF-8 mode: printf "\xc2\x9b31mHi\e[0m\n"
- ryan-c 6y ago...interesting
- lunixbochs 6y agoHm, but I won't know if the text/terminal is utf8 or not going in.
- caf 6y agoRight... and you have the Windows-1252 versus iso-8859-1 situation, which only differ in that the former puts printable characters where the latter has C1 control codes. Of course your code is a library so you have the library author's prerogative to punt that problem to the users :)