From d6c4dd4efc573cdb2ccdbd8b0915bc4b0b95681a Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sun, 17 Jun 2012 09:33:25 +0200 Subject: [PATCH] textutils.py: don't try to convert unicode strings again --- daklib/textutils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daklib/textutils.py b/daklib/textutils.py index 03df5d85..c9cc4ed3 100644 --- a/daklib/textutils.py +++ b/daklib/textutils.py @@ -34,6 +34,8 @@ def force_to_utf8(s): Forces a string to UTF-8. If the string isn't already UTF-8, it's assumed to be ISO-8859-1. """ + if isinstance(s, unicode): + return s try: unicode(s, 'utf-8') return s -- 2.39.5