Explicitly set encoding for stdin and stderr.