From 6b5cf3396dbfc8208c9be790669a5d9e83307f2e Mon Sep 17 00:00:00 2001 From: Chase Sterling Date: Mon, 26 Nov 2012 22:01:15 -0500 Subject: [PATCH] Rencode module now always loads strings as utf-8 encoded byte strings. --- deluge/rencode.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/deluge/rencode.py b/deluge/rencode.py index a0a6eec35..188c51736 100644 --- a/deluge/rencode.py +++ b/deluge/rencode.py @@ -159,12 +159,6 @@ def decode_string(x, f): raise ValueError colon += 1 s = x[colon:colon+n] - try: - t = s.decode("utf8") - if len(t) != len(s): - s = t - except UnicodeDecodeError: - pass return (s, colon+n) def decode_list(x, f):