primitivus: fixed unicode issue on date in chat window

This commit is contained in:
Goffi 2010-08-20 01:14:47 +08:00
commit a2fff03e96

View file

@ -63,7 +63,7 @@ class ChatText(urwid.FlowWidget):
render_txt = []
if self.parent.show_timestamp:
time_format = "%c" if self.timestamp < self.parent.day_change else "%H:%M" #if the message was sent before today, we print the full date
render_txt.append(('date',"[%s]" % time.strftime(time_format, self.timestamp)))
render_txt.append(('date',"[%s]" % time.strftime(time_format, self.timestamp).decode('utf-8')))
if self.parent.show_short_nick:
render_txt.append(('my_nick' if self.my_mess else 'other_nick',"**" if self.my_mess else "*"))
else: