From 27f1461abef63fefa05ad3151e2e5b5dd5c38989 Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Wed, 19 Apr 2006 07:51:11 +0000 Subject: [PATCH] get timeformat in utf-8 --- src/conversation_textview.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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':