From 8735fbba4469f0350ca875b7af44f6930f4c6e44 Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Mon, 24 Mar 2008 19:27:16 -0400 Subject: Fix up more unicode shenanigans (#437993) Ensure we encode/decode to utf8 at appropriate points to avoid tracebacks in text mode --- textw/progress_text.py | 2 +- yuminstall.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/textw/progress_text.py b/textw/progress_text.py index b8617841c..c9994d2b9 100644 --- a/textw/progress_text.py +++ b/textw/progress_text.py @@ -40,7 +40,7 @@ def strip_markup(text): continue elif not inTag: r += c - return r + return r.encode("utf-8") class InstallProgressWindow: def __init__(self, screen): diff --git a/yuminstall.py b/yuminstall.py index 2a64ef4ea..75b17f7d8 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -157,7 +157,10 @@ class AnacondaCallback: pkgStr = "%s-%s-%s.%s" % (po.name, po.version, po.release, po.arch) s = _("Installing %s (%s)\n") %(pkgStr, size_string(hdr['size'])) - s += (hdr['summary'] or "") + sum = hdr['summary'] or "" + if type(sum) != unicode: + sum = unicode(sum, encoding='utf-8') + s += sum self.progress.set_label(s) self.instLog.write(self.modeText % pkgStr) -- cgit