In invoke.runners.Local, the stdout/stderr of child processes is read
and forwarded to the console (i.e. invoke's stdout/stderr). The incoming
data is read with locale.getdefaultencoding(), while output happens with
If these two encodings differ, it may not be possible to write the
received data to stdout, e.g. if an UTF-8 Yen character is received, but
sys.stdout.encoding is 'latin1' or 'ascii'. If that happens, the
resulting exception causes the thread to end, and the child process
hangs due to the child filling its output buffer.
This is mostly a concern on Windows, where the preferred encoding and
the console I/O encoding often differ.