From b353a0721af2c21600c18bede8ac3e9fb5c9afd0 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 16 Jun 2016 21:49:09 +0200 Subject: [PATCH] fix length of printed string in about tab of vcard window --- src/profile_window.py | 2 +- src/vcard.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/profile_window.py b/src/profile_window.py index c68b450ef..729cb01c4 100644 --- a/src/profile_window.py +++ b/src/profile_window.py @@ -288,7 +288,7 @@ class ProfileWindow: else: if i == 'DESC': self.xml.get_object('DESC_textview').get_buffer().set_text( - vcard_[i], len(vcard[i])) + vcard_[i], len(vcard[i].encode('utf-8'))) else: self.set_value(i + '_entry', vcard_[i]) if self.update_progressbar_timeout_id is not None: diff --git a/src/vcard.py b/src/vcard.py index 4eee692c9..1db27d43b 100644 --- a/src/vcard.py +++ b/src/vcard.py @@ -240,7 +240,7 @@ class VcardWindow: else: if i == 'DESC': self.xml.get_object('DESC_textview').get_buffer().set_text( - vcard[i], len(vcard[i])) + vcard[i], len(vcard[i].encode('utf-8'))) elif i != 'jid': # Do not override jid_label self.set_value(i + '_label', vcard[i]) self.vcard_arrived = True