aboutsummaryrefslogtreecommitdiff
path: root/pypy
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2023-04-24 23:03:44 +0300
committerMatti Picus <matti.picus@gmail.com>2023-04-24 23:03:44 +0300
commit7c5b944b434cdae0288237e2cdfed8550995036c (patch)
treed8e95c24145a0149b0dea95eb974a9036d6cbe19 /pypy
parentmerge default (diff)
downloadpypy-7c5b944b434cdae0288237e2cdfed8550995036c.tar.gz
pypy-7c5b944b434cdae0288237e2cdfed8550995036c.tar.bz2
pypy-7c5b944b434cdae0288237e2cdfed8550995036c.zip
prefer utf-8 encoding on windows
Diffstat (limited to 'pypy')
-rw-r--r--pypy/module/_locale/interp_locale.py2
-rw-r--r--pypy/module/sys/std_test.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/pypy/module/_locale/interp_locale.py b/pypy/module/_locale/interp_locale.py
index 785714940b..b007ffe683 100644
--- a/pypy/module/_locale/interp_locale.py
+++ b/pypy/module/_locale/interp_locale.py
@@ -329,5 +329,5 @@ if rlocale.HAVE_LIBINTL:
if sys.platform == 'win32':
def getdefaultlocale(space):
- language, encoding = rlocale.getdefaultlocale()
+ language, encoding = "", "utf-8" # rlocale.getdefaultlocale()
return space.newtuple2(space.newtext(language), space.newtext(encoding))
diff --git a/pypy/module/sys/std_test.py b/pypy/module/sys/std_test.py
index e798b4e935..b35586d00c 100644
--- a/pypy/module/sys/std_test.py
+++ b/pypy/module/sys/std_test.py
@@ -3,16 +3,16 @@
import _io
-stdin = _io.open(0, "r", encoding="ascii",
+stdin = _io.open(0, "r", encoding="utf-8",
closefd=False)
stdin.buffer.raw.name = "<stdin>"
-stdout = _io.open(1, "w", encoding="ascii",
+stdout = _io.open(1, "w", encoding="utf-8",
buffering=1,
closefd=False)
stdout.buffer.raw.name = "<stdout>"
-stderr = _io.open(2, "w", encoding="ascii",
+stderr = _io.open(2, "w", encoding="utf-8",
errors="backslashreplace",
buffering=1,
closefd=False)