diff --git a/src/groupchat_window.py b/src/groupchat_window.py index d11f9fc87..6928f40d0 100644 --- a/src/groupchat_window.py +++ b/src/groupchat_window.py @@ -1003,7 +1003,7 @@ class GroupchatWindow(chat.Chat): self.xmls[room_jid] = gtk.glade.XML(GTKGUI_GLADE, 'gc_vbox', APP) self.childs[room_jid] = self.xmls[room_jid].get_widget('gc_vbox') chat.Chat.new_tab(self, room_jid) - self.nicks[room_jid] = gtkgui_helpers.ensure_unicode_string(nick) + self.nicks[room_jid] = nick.decode('utf-8') self.subjects[room_jid] = '' self.room_creation[room_jid] = time.time() self.nick_hits[room_jid] = [] diff --git a/src/gtkgui_helpers.py b/src/gtkgui_helpers.py index 2edb19a7d..f3b177b72 100644 --- a/src/gtkgui_helpers.py +++ b/src/gtkgui_helpers.py @@ -86,8 +86,8 @@ def reduce_chars_newlines(text, max_chars = 0, max_lines = 0, If any of the params is not present(None or 0) the action on it is not performed ''' - # assure that we have only unicode text - text = ensure_unicode_string(text) + # make sure that we have only unicode text + text = text.decode('utf-8') def _cut_if_long(str): if len(str) > max_chars: @@ -122,11 +122,6 @@ def escape_for_pango_markup(string): return escaped_str -def ensure_unicode_string(string): - if type(string) == str: - return unicode(string, encoding = 'utf-8') - return string - def autodetect_browser_mailer(): #recognize the environment for appropriate browser/mailer if os.path.isdir('/proc'):