Tcl_ReadChars() is a nonblocking function and may return 0 even if select(2)
indicated some data was available. Cope with this by explicitly checking for
EOF if Tcl_ReadChars() returned 0.
Interestingly, this makes the comment immediately preceding the test accurate
To trigger the failure this patch fixes easily, run with a multi-byte locale (e.g.
en_GB.UTF-8) and over a pty/serial port/etc., send a single octet of a valid
multi-byte character (e.g. 0xE0).
Whilst I generated this patch against 126.96.36.199 it applies fine against 5.45 and
a visual inspection shows all is well.