I'm connected to a Linux machine using PuTTY.
On the Linux machine, I'm running a python script that takes a list of characters and prints each character, together with its index, in order.
Some of the characters in my list fall outside the range of printable ascii characters. These irregular characters are corrupting my output. Sometimes they simply don't appear, while other times they actually delete large chunks of valid text.
I thought I could correct this by turning off buffering, but the problem still occurs when I run the script using the python -u flag.
Interestingly, this problem does not occur when I pipe my input to the less reader. In less, irregular characters show up like this: <A9>
, <A7>
, ^V
, ^@
, etc. No chunks of text are missing.
I'm not sure where my problem lies. Is there a way to configure my terminal so that unpiped output will still show irregular characters?