From c494b7f5b93898e7cc60c93917008138d486f5c0 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Thu, 2 Nov 2006 13:40:57 +0000 Subject: [PATCH] if it is alreayd unicode instance, do not decode --- src/common/helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/helpers.py b/src/common/helpers.py index 1b1e3a895..56d436b49 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -550,6 +550,8 @@ def get_icon_name_to_show(contact, account = None): def decode_string(string): '''try to decode (to make it Unicode instance) given string''' + if isinstance(string, unicode): + return string # by the time we go to iso15 it better be the one else we show bad characters encodings = (sys.getfilesystemencoding(), 'utf-8', 'iso-8859-15') for encoding in encodings: