Use UTF-8 for stdout and stderr in pipes

- The output encodings for stderr and stdout now default to UTF-8 when
  those streams are not attached to terminals.