summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-09-29 14:15:57 -0400
committerChris Lumens <clumens@redhat.com>2008-09-29 14:16:35 -0400
commitdb568b7fa2bc35a389ac31dc0bbe9f973da4e8fb (patch)
treed5b42cab9ab98e5d0ebbf4e3f63441b210b2f923
parenta6fe6cf2cf24367bc65d9775046f2df2af33890c (diff)
downloadanaconda-db568b7fa2bc35a389ac31dc0bbe9f973da4e8fb.tar.gz
anaconda-db568b7fa2bc35a389ac31dc0bbe9f973da4e8fb.tar.xz
anaconda-db568b7fa2bc35a389ac31dc0bbe9f973da4e8fb.zip
Run all text through unicode() before putting it into the TextBuffer.
Note that "type" is a variable in the MessageWindow and used about a hundred places throughout the code so the only way to get at type() is by going looking for it in __builtins__. I feel ill.
-rwxr-xr-xgui.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gui.py b/gui.py
index dfd0a345c..09bdd6ef2 100755
--- a/gui.py
+++ b/gui.py
@@ -1049,6 +1049,9 @@ class DetailedMessageWindow(MessageWindow):
iter = textbuf.get_start_iter()
for line in longText:
+ if __builtins__.get("type")(line) != unicode:
+ line = unicode(line, encoding='utf-8')
+
textbuf.insert(iter, line)
self.detailedView.set_buffer(textbuf)