Close #11022: TextIOWrapper doesn't call locale.setlocale() anymore

open() and io.TextIOWrapper are now calling locale.getpreferredencoding(False)
instead of locale.getpreferredencoding() in text mode if the encoding is not
specified. Don't change temporary the locale encoding using locale.setlocale(),
use the current locale encoding instead of the user preferred encoding.

Explain also in open() documentation that locale.getpreferredencoding(False) is
called if the encoding is not specified.
diff --git a/Misc/NEWS b/Misc/NEWS
index b8d0928..332e408 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,12 @@
 Core and Builtins
 -----------------
 
+- Issue #11022: open() and io.TextIOWrapper are now calling
+  locale.getpreferredencoding(False) instead of locale.getpreferredencoding()
+  in text mode if the encoding is not specified. Don't change temporary the
+  locale encoding using locale.setlocale(), use the current locale encoding
+  instead of the user preferred encoding.
+
 - Issue #14673: Add Eric Snow's sys.implementation implementation.
 
 Library