wttr.in
wttr.in copied to clipboard
Option &T doesn't remove some Esc sequences
There's strange escape sequence: <1b>)B, not removed by &T option (whose description states removing all terminal sequences, not just colors. This sequence seems to be part of v2 format, as I don't see it in default format.
Ccan't understand it's meaning, as it looks same with it and without in terminals I have in use (tried xfce4 term, urxvt, alacritty).
Command: curl 'https://wttr.in/Prague?format=v2&T&F&lang=en'

For now I workarounded this by filtering with sed:
curl -s 'https://wttr.in/Prague?format=v2&T&F&lang=en' | sed 's/\x1b(B//g'
Or more extended - if tooltip has borders, this could also have borders filtered:
curl -s 'https://wttr.in?format=v2&T&F&lang=ru' | sed '/[└┘]/d; {s/^[┌│]//; s/[│┐]$//; s/\x1b(B//g}'

Perhaps, better not use color emoji outside of terminal, as their size doesn't match any monospace font - it seems even pango can't determine correct width, at least first time.
Yes, we have a similar problem for the one-line mode, and there we have an option to disable the emojis. Maybe we should add something like this here. And yes, I can confirm the problem with excessive ANSI symbols when T. We have the same problem in rate.sx, where the same rendering engine is used. I am working on a new rendering engine now, that will don't have this problem