iso15 is our last chance

This commit is contained in:
Nikos Kouremenos 2005-11-18 13:26:24 +00:00
parent 965e9cb8c7
commit 68b0f18402
1 changed files with 2 additions and 1 deletions

View File

@ -551,7 +551,8 @@ def get_icon_name_to_show(contact, account = None):
def decode_string(string):
'''try to decode (to make it Unicode instance) given string'''
encodings = (sys.getfilesystemencoding(), 'utf-8', 'iso-8859-1', 'iso-8859-15')
# 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:
try:
string = string.decode(encoding)