Fix UnicodeDecodeError when stdout is piped
Fix encoding issue. Remote text must be decoded using utf-8 rather than ASCII