diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2011-08-10 00:33:50 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2011-12-04 13:01:50 +0000 |
commit | 9d16b50075bf649cf201fd3e107b48d73d2a0b84 (patch) | |
tree | d772ff7fa743bfac32a2bea464b1ce120232f10b | |
parent | 04b89491789603aed7e5807a154ca6869ce256ad (diff) | |
download | deluge-9d16b50075bf649cf201fd3e107b48d73d2a0b84.tar.gz deluge-9d16b50075bf649cf201fd3e107b48d73d2a0b84.tar.bz2 deluge-9d16b50075bf649cf201fd3e107b48d73d2a0b84.zip |
Fix #1917 : UnicodeDecodeError with long torrent names
-rw-r--r-- | deluge/ui/console/modes/format_utils.py | 6 |
1 files 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 |