[Aлекс]. Fix time string encoding in the russian windows(cp1251).

This commit is contained in:
Denis Fomin 2012-09-03 22:02:07 +04:00
parent 88194e02bc
commit ce955c00fe
1 changed files with 1 additions and 1 deletions

View File

@ -1303,7 +1303,7 @@ class ConversationTextview(gobject.GObject):
timestamp_str = helpers.from_one_line(timestamp_str)
format_ += timestamp_str
tim_format = time.strftime(format_, tim)
if locale.getpreferredencoding() != 'KOI8-R':
if locale.getpreferredencoding() not in ('KOI8-R', 'cp1251'):
# if tim_format comes as unicode because of day_str.
# we convert it to the encoding that we want (and that is utf-8)
tim_format = helpers.ensure_utf8_string(tim_format)