From ce955c00fe0348247a033dd8c81131814cddcf7b Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Mon, 3 Sep 2012 22:02:07 +0400 Subject: [PATCH] =?UTF-8?q?[A=D0=BB=D0=B5=D0=BA=D1=81].=20Fix=20time=20str?= =?UTF-8?q?ing=20encoding=20in=20the=20russian=20windows(cp1251).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/conversation_textview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conversation_textview.py b/src/conversation_textview.py index f342d12c7..8d7cce1a6 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -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)