Fix.unicode (#1)

Encoding str from utf-8 before sending to socket
master
jadjay 2016-06-22 19:00:06 +02:00 committed by Jeff Balogh
parent 5c347d82f7
commit 4c7ede54ef
1 changed files with 3 additions and 0 deletions

View File

@ -780,7 +780,10 @@ class ServerConnection(Connection):
"""Send raw string to the server. """Send raw string to the server.
The string will be padded with appropriate CR LF. The string will be padded with appropriate CR LF.
From here everything need to be encoded in str from utf-8
""" """
string=string.encode('utf-8')
if self.socket is None: if self.socket is None:
raise ServerNotConnectedError, "Not connected." raise ServerNotConnectedError, "Not connected."
try: try: