diff --git a/.gitignore b/.gitignore index ae11231..0e18061 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ build/** *.pyc *.egg-info dist/** +.idea +atlassian-ide-plugin.xml diff --git a/pyapns/server.py b/pyapns/server.py index 3c021bd..a4ec928 100644 --- a/pyapns/server.py +++ b/pyapns/server.py @@ -327,7 +327,7 @@ def encode_notifications(tokens, notifications): if type(notifications) is dict and type(tokens) in (str, unicode): tokens, notifications = ([tokens], [notifications]) if type(notifications) is list and type(tokens) is list: - return ''.join(map(lambda y: structify(*y), ((binaryify(t), json.dumps(p, separators=(',',':'))) + return ''.join(map(lambda y: structify(*y), ((binaryify(t), json.dumps(p, separators=(',',':'), ensure_ascii=False).encode('utf-8')) for t, p in zip(tokens, notifications)))) def decode_feedback(binary_tuples):