Author: Armin Rigo <ar...@tunes.org> Branch: py3.5 Changeset: r89546:1545e485e3c1 Date: 2017-01-13 17:29 +0100 http://bitbucket.org/pypy/pypy/changeset/1545e485e3c1/
Log: tcl fix diff --git a/lib_pypy/_tkinter/tclobj.py b/lib_pypy/_tkinter/tclobj.py --- a/lib_pypy/_tkinter/tclobj.py +++ b/lib_pypy/_tkinter/tclobj.py @@ -31,7 +31,7 @@ def FromTclString(s): try: - return s.decode('utf8') + return s.decode('utf-8') except UnicodeDecodeError: # Tcl encodes null character as \xc0\x80 try: @@ -194,7 +194,7 @@ @property def typename(self): - return tkffi.string(self._value.typePtr.name) + return FromTclString(tkffi.string(self._value.typePtr.name)) @property def string(self): @@ -203,6 +203,6 @@ length = tkffi.new("int*") s = tklib.Tcl_GetStringFromObj(self._value, length) value = tkffi.buffer(s, length[0])[:] - value = value.decode('utf8') + value = value.decode('utf-8') self._string = value return self._string _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit