From: Kaliko Jack Date: Mon, 15 Apr 2013 18:17:07 +0000 (+0200) Subject: Explicit R/W utf-8 encoded bytes to socket X-Git-Tag: v0.3.1b~2 X-Git-Url: https://git.kaliko.me/?a=commitdiff_plain;h=652e68d3be1f6f7b97d715deef99a258f249595b;p=python-musicpd.git Explicit R/W utf-8 encoded bytes to socket python-mpd now deals only with unicode --- diff --git a/mpd.py b/mpd.py index 373bd16..b504428 100644 --- a/mpd.py +++ b/mpd.py @@ -426,8 +426,8 @@ class MPDClient(object): self._sock = self._connect_unix(host) else: self._sock = self._connect_tcp(host, port) - self._rfile = self._sock.makefile("r") - self._wfile = self._sock.makefile("w") + self._rfile = self._sock.makefile("r", encoding='utf-8') + self._wfile = self._sock.makefile("w", encoding='utf-8') try: self._hello() except: