3 ms·
So the "correct" way is not that easy, after all. On the other hand, ignoring ancient terminals and simply pretending everything is color-enabled, VT-220 compa
by Joker_vD 2y ago
So the "correct" way is not that easy, after all.
On the other hand, ignoring ancient terminals and simply pretending everything is color-enabled, VT-220 compatible, UTF-8 aware terminal emulator works well enough™ almost everywhere, including recent versions of Windows (which IIRC don't even have terminfo; not that it'd help since the legacy Windows console uses ioctl()-like interface instead of the escape sequences) — and is actually easy.
- teddyh 2y agoOutputting UTF-8 to a UTF-8 locale is not easy? Most of this is automatically handled by appropriate libraries. I.e. I would expect python3 -c 'print("\N{GREEK SMALL LETTER BETA}")' to just work on any terminal, as Python does the right thing for you.