diff -r a2ffc966363e Lib/subprocess.py --- a/Lib/subprocess.py Wed Jun 01 14:38:18 2016 -0700 +++ b/Lib/subprocess.py Thu Jun 02 03:18:13 2016 +0300 @@ -937,15 +937,18 @@ self.stdin = io.open(p2cwrite, 'wb', bufsize) if universal_newlines: self.stdin = io.TextIOWrapper(self.stdin, write_through=True, + encoding=self.stdin.encoding, line_buffering=(bufsize == 1)) if c2pread != -1: self.stdout = io.open(c2pread, 'rb', bufsize) if universal_newlines: - self.stdout = io.TextIOWrapper(self.stdout) + self.stdout = io.TextIOWrapper(self.stdout, + encoding=sys.stdout.encoding) if errread != -1: self.stderr = io.open(errread, 'rb', bufsize) if universal_newlines: - self.stderr = io.TextIOWrapper(self.stderr) + self.stderr = io.TextIOWrapper(self.stderr, + encoding=sys.stderr.encoding) self._closed_child_pipe_fds = False try: