Fix input of UTF-8 wide chars: use encode() instead of str() for user input processing
This commit is contained in:
parent
7b4aefb28c
commit
e09c80abf5
@ -72,7 +72,7 @@ class InputLineEdit(QtGui.QLineEdit):
|
||||
QtGui.QLineEdit.keyPressEvent(self, event)
|
||||
|
||||
def _input_return_pressed(self):
|
||||
self._history.append(str(self.text()))
|
||||
self._history.append(self.text().encode('utf-8'))
|
||||
self._history_index = len(self._history)
|
||||
self.textSent.emit(self.text())
|
||||
self.clear()
|
||||
|
@ -130,7 +130,7 @@ class Network(QtCore.QObject):
|
||||
self._socket.abort()
|
||||
|
||||
def send_to_weechat(self, message):
|
||||
self._socket.write(str(message))
|
||||
self._socket.write(message.encode('utf-8'))
|
||||
|
||||
def desync_weechat(self):
|
||||
self.send_to_weechat('desync\n')
|
||||
|
Loading…
Reference in New Issue
Block a user