aboutsummaryrefslogtreecommitdiff
path: root/discord/utils.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-05-10 19:51:59 -0400
committerRapptz <[email protected]>2016-05-10 19:52:34 -0400
commit0c8d5ee863ae6968d0ca4504e9d8dd166e1a6419 (patch)
tree9d60d973050bf2bdf31030caa843938e4e862694 /discord/utils.py
parentFix issue with Client.purge_from not deleting the 101st message. (diff)
downloaddiscord.py-0c8d5ee863ae6968d0ca4504e9d8dd166e1a6419.tar.xz
discord.py-0c8d5ee863ae6968d0ca4504e9d8dd166e1a6419.zip
Force encoding of text retrieval functions to use utf-8.
Closes #207
Diffstat (limited to 'discord/utils.py')
-rw-r--r--discord/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/utils.py b/discord/utils.py
index d4056b23..9f8f856a 100644
--- a/discord/utils.py
+++ b/discord/utils.py
@@ -208,10 +208,10 @@ def _verify_successful_response(response):
message = None
text = None
if response.headers['content-type'] == 'application/json':
- data = yield from response.json()
+ data = yield from response.json(encoding='utf-8')
message = data.get('message')
else:
- text = yield from response.text()
+ text = yield from response.text(encoding='utf-8')
if code == 403:
raise Forbidden(response, message, text)