Author: Ronan Lamy <[email protected]>
Branch: py3k
Changeset: r87608:b584712b82e0
Date: 2016-10-06 04:20 +0100
http://bitbucket.org/pypy/pypy/changeset/b584712b82e0/
Log: Use latin-1: mojibake is better than crashing, here
diff --git a/pypy/module/cpyext/state.py b/pypy/module/cpyext/state.py
--- a/pypy/module/cpyext/state.py
+++ b/pypy/module/cpyext/state.py
@@ -103,7 +103,7 @@
progname = space.str_w(argv0)
else:
progname = "pypy"
- progname = progname.decode('ascii') # XXX: which encoding??
+ progname = progname.decode('latin-1') # XXX: which encoding??
self.programname = rffi.unicode2wcharp(progname)
lltype.render_immortal(self.programname)
return self.programname
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit