dictclient: Encode as utf-8 instead of ASCII

dict.org has dictionaries with words containing non-ASCII characters.
This commit is contained in:
Johannes Löthberg 2015-02-21 19:59:47 +01:00
parent 0d7e0f73fb
commit 1654bfca0c
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ class Connection:
def sendcommand(self, command):
"""Takes a command, without a newline character, and sends it to
the server."""
self.wfile.write(command.encode('ascii') + b"\n")
self.wfile.write(command.encode('utf-8') + b"\n")
def define(self, database, word):
"""Returns a list of Definition objects for each matching