don't ensure_utf8_string() when prefferedencoding is not 'UTF-8'. fixes #2514
This commit is contained in:
parent
a9624838ef
commit
3e18b3b7fc
|
@ -709,9 +709,10 @@ class ConversationTextview:
|
|||
format += day_str + ' '
|
||||
format += '%X' + after_str
|
||||
tim_format = time.strftime(format, tim)
|
||||
# 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)
|
||||
if locale.getpreferredencoding() == 'UTF-8':
|
||||
# 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)
|
||||
buffer.insert_with_tags_by_name(end_iter, tim_format + ' ',
|
||||
*other_tags_for_time)
|
||||
elif current_print_time == 'sometimes' and kind != 'info':
|
||||
|
|
Loading…
Reference in New Issue