> undertime prints terminal escape sequences to pipes and files. There are two types of escape sequences here:
• SGR. These make sense, as undertime uses color to convey its output. A plain text interface would be a reasonable request but is probably a feature (anarcat: you can detect non-terminals by !isatty(1) ). • VT100 line drawing. These codes shouldn't be used these days: there's a debate whether they're allowed within an UTF-8 locale, as the relevant standard seems to say no. I for one consider this interpretation bogus, especially as it forces programs to know about locales even if they don't have a reason to care, and _most_ terminal authors think so as well -- but "most" doesn't mean all. Here's some information: https://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/utf8-plus-vt100.html and putty is one of terminals that does otherwise. Also, tools like "less -R", which support colors well, don't handle such line drawing. This includes my ansi2txt and ansi2html -- understanding these codes would be a reasonable feature, but, like less' author, I haven't either thought nor bothered to implement that yet. Thus, let's assume those who claim supporting them with UTF-8 is wrong are right :þ . This leaves two options for you: either you can detect if the locale is UTF-8 and switch codes you output accordingly, or you can consider this a waste of your time and just output Unicode unconditionally. As the latter works cleanly with redirection and other non-terminal receivers, this is what I'd suggest. It's overdue to declare ancient locales unsupported. Meow! -- ⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ A dumb species has no way to open a tuna can. ⢿⡄⠘⠷⠚⠋⠀ A smart species invents a can opener. ⠈⠳⣄⠀⠀⠀⠀ A master species delegates.