diff --git a/src/conversation_textview.py b/src/conversation_textview.py index 19832ded4..d38cd40af 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -28,6 +28,7 @@ import gtk.glade import pango import gobject import time +import sys import tooltips import dialogs import locale @@ -607,8 +608,9 @@ class ConversationTextview: if day_str: format += day_str + ' ' format += '%X' + after_str - tim_format = time.strftime(format, tim).decode( - locale.getpreferredencoding()) + # format comes as unicode, because of day_str. + # we convert it to the encoding that we want + tim_format = time.strftime(format.encode('utf-8'), tim) buffer.insert_with_tags_by_name(end_iter, tim_format + ' ', *other_tags_for_time) elif gajim.config.get('print_time') == 'sometimes':