diff --git a/gameview.py b/gameview.py index d98c937..224b36f 100644 --- a/gameview.py +++ b/gameview.py @@ -277,7 +277,7 @@ class AOCharMovie(QtGui.QLabel): self.scaling = scaling - p_char = p_char.lower().decode('utf-8') + p_char = p_char.lower() p_emote = p_emote.lower() original_path = self.test_path([AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif", AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".gif"]) @@ -2019,7 +2019,7 @@ class gui(QtGui.QWidget): msg += str(self.mychatcolor)+"#" if "cccc_ic_support" in self.features: - showname = self.showname + showname = self.showname.decode('utf-8') if self.showname == "" and not self.charshowname == "": showname = self.charshowname msg += showname+"#" # custom showname @@ -2162,18 +2162,22 @@ class gui(QtGui.QWidget): if self.additivebtn.isChecked(): self.icchatinput.insert(" ") - f_char = self.m_chatmessage[CHARNAME].decode("utf-8") + self.m_chatmessage[CHARNAME] = self.m_chatmessage[CHARNAME].decode("utf-8") + self.m_chatmessage[SHOWNAME] = self.m_chatmessage[SHOWNAME].decode('utf-8') + + f_char = self.m_chatmessage[CHARNAME] evidence = int(self.m_chatmessage[EVIDENCE])-1 t = time.localtime() logcharname = f_char #TODO: UnicodeWarning: Unicode unequal comparison failed to convert both arguments to Unicode - interpreting them as being unequal - #if f_char.lower() != self.charlist[f_char_id][0].lower(): - # logcharname = self.charlist[f_char_id][0] + ' (' + f_char.decode("utf-8") + ')' + if f_char.lower() != self.charlist[f_char_id][0].lower(): + logcharname = self.charlist[f_char_id][0] + ' (' + f_char.decode("utf-8") + ')' + if self.m_chatmessage[SHOWNAME] and self.m_chatmessage[SHOWNAME].lower() != f_char.lower(): try: - logcharname += " ("+self.m_chatmessage[SHOWNAME].decode('utf-8')+")" + logcharname += " ("+self.m_chatmessage[SHOWNAME]+")" except: logcharname += " (???)" @@ -2306,9 +2310,9 @@ class gui(QtGui.QWidget): self.effectview.stop() if not self.m_chatmessage[SHOWNAME]: - self.name.setText(self.m_chatmessage[CHARNAME].decode("utf-8")) + self.name.setText(self.m_chatmessage[CHARNAME]) else: - self.name.setText(self.m_chatmessage[SHOWNAME].decode("utf-8")) + self.name.setText(self.m_chatmessage[SHOWNAME]) self.chatbox.hide()