From 9d16b50075bf649cf201fd3e107b48d73d2a0b84 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 10 Aug 2011 00:33:50 +0100 Subject: [PATCH] Fix #1917 : UnicodeDecodeError with long torrent names --- deluge/ui/console/modes/format_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/ui/console/modes/format_utils.py b/deluge/ui/console/modes/format_utils.py index fa064f812..c31de7ff9 100644 --- a/deluge/ui/console/modes/format_utils.py +++ b/deluge/ui/console/modes/format_utils.py @@ -84,7 +84,7 @@ def trim_string(string, w, have_dbls): if w <= 0: return "" elif w == 1: - return "…" + return u"…" elif have_dbls: # have to do this the slow way chrs = [] @@ -100,9 +100,9 @@ def trim_string(string, w, have_dbls): if width != w: chrs.pop() chrs.append('.') - return "%s… "%("".join(chrs)) + return u"%s… "%("".join(chrs)) else: - return "%s… "%(string[0:w-2]) + return u"%s… "%(string[0:w-2]) def format_column(col, lim): dbls = 0