bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214)

(cherry picked from commit 2515a28230b1a011205f30263da6b01c6bd167a3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 files changed