diff --git a/src/qweechat/input.py b/src/qweechat/input.py index 42c3f8e..d31124c 100644 --- a/src/qweechat/input.py +++ b/src/qweechat/input.py @@ -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() diff --git a/src/qweechat/network.py b/src/qweechat/network.py index 9b49222..2a5184e 100644 --- a/src/qweechat/network.py +++ b/src/qweechat/network.py @@ -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')