tb on utf-8 nick
This commit is contained in:
parent
d065e3a289
commit
c522dcedbb
|
@ -694,8 +694,8 @@ class GroupchatWindow(chat.Chat):
|
||||||
"""Print a line in the conversation:
|
"""Print a line in the conversation:
|
||||||
if contact is set: it's a message from someone
|
if contact is set: it's a message from someone
|
||||||
if contact is not set: it's a message from the server"""
|
if contact is not set: it's a message from the server"""
|
||||||
if type(text) == unicode:
|
if type(text) == str:
|
||||||
text = text.encode('utf-8')
|
text = unicode(text, 'utf-8')
|
||||||
other_tags_for_name = []
|
other_tags_for_name = []
|
||||||
other_tags_for_text = []
|
other_tags_for_text = []
|
||||||
if contact:
|
if contact:
|
||||||
|
@ -706,8 +706,13 @@ class GroupchatWindow(chat.Chat):
|
||||||
else:
|
else:
|
||||||
kind = 'status'
|
kind = 'status'
|
||||||
|
|
||||||
|
# nick can be unicode or utf-8
|
||||||
|
nick = self.nicks[room_jid]
|
||||||
|
if type(nick) == str:
|
||||||
|
nick = unicode(nick, 'utf-8')
|
||||||
|
|
||||||
if kind == 'incoming' and \
|
if kind == 'incoming' and \
|
||||||
text.lower().find(self.nicks[room_jid].lower()) != -1:
|
text.lower().find(nick.lower()) != -1:
|
||||||
other_tags_for_name.append('bold')
|
other_tags_for_name.append('bold')
|
||||||
other_tags_for_text.append('marked')
|
other_tags_for_text.append('marked')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue