[pypy-commit] pypy py3k: Use latin-1: mojibake is better than crashing, here
rlamy
pypy.commits at gmail.com
Wed Oct 5 23:21:15 EDT 2016
Author: Ronan Lamy <ronan.lamy at gmail.com>
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
More information about the pypy-commit
mailing list