From 1e328d839cc15593bebc642b9b9bd58cb69b8ccf Mon Sep 17 00:00:00 2001
From: Calum Lind <calumlind+deluge@gmail.com>
Date: Wed, 10 Aug 2011 00:33:50 +0100
Subject: [PATCH 2/2] Fix UnicodeDecodeError with long torrent names
---
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 fa064f8..c31de7f 100644
a
|
b
|
def trim_string(string, w, have_dbls): |
84 | 84 | if w <= 0: |
85 | 85 | return "" |
86 | 86 | elif w == 1: |
87 | | return "âŠ" |
| 87 | return u"âŠ" |
88 | 88 | elif have_dbls: |
89 | 89 | # have to do this the slow way |
90 | 90 | chrs = [] |
… |
… |
def trim_string(string, w, have_dbls): |
100 | 100 | if width != w: |
101 | 101 | chrs.pop() |
102 | 102 | chrs.append('.') |
103 | | return "%s⊠"%("".join(chrs)) |
| 103 | return u"%s⊠"%("".join(chrs)) |
104 | 104 | else: |
105 | | return "%s⊠"%(string[0:w-2]) |
| 105 | return u"%s⊠"%(string[0:w-2]) |
106 | 106 | |
107 | 107 | def format_column(col, lim): |
108 | 108 | dbls = 0 |