Commit a340e109 authored by Martin v. Löwis's avatar Martin v. Löwis

Don't try to convert str to Unicode anymore.

parent 033b7d8c
......@@ -35,16 +35,7 @@ class OutputWindow(EditorWindow):
# Act as output file
def write(self, s, tags=(), mark="insert"):
# Tk assumes that byte strings are Latin-1;
# we assume that they are in the locale's encoding
if isinstance(s, str):
try:
s = str(s, IOBinding.encoding)
except TypeError:
raise
except UnicodeError:
# some other encoding; let Tcl deal with it
pass
assert isinstance(s, str)
self.text.insert(mark, s, tags)
self.text.see(mark)
self.text.update()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment