diff -r dbe69f54b09c Python/fileutils.c --- a/Python/fileutils.c Wed Jun 01 13:54:33 2016 -0700 +++ b/Python/fileutils.c Thu Jun 02 19:45:51 2016 +0300 @@ -52,7 +52,7 @@ #if defined(MS_WINDOWS) if (fd == 0) cp = GetConsoleCP(); - else if (fd == 1 || fd == 2) + else if (fd == 1 || fd == 2 || fd == 3) // stdout, stderr and pipe cp = GetConsoleOutputCP(); else cp = 0;