From 2d7fb82dd67a8db14e7c32be504dce7fa38b17fb Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 19 Aug 2017 21:38:22 -0700 Subject: [PATCH] Fix API json encoding --- plexpy/api2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plexpy/api2.py b/plexpy/api2.py index 193c3e4a..aae44580 100644 --- a/plexpy/api2.py +++ b/plexpy/api2.py @@ -500,9 +500,9 @@ General optional parameters: cherrypy.response.headers['Content-Type'] = 'application/json;charset=UTF-8' try: if self._api_debug: - out = json.dumps(out, indent=4, sort_keys=True) + out = json.dumps(out, indent=4, sort_keys=True, ensure_ascii=False).encode('utf-8') else: - out = json.dumps(out) + out = json.dumps(out, ensure_ascii=False).encode('utf-8') if self._api_callback is not None: cherrypy.response.headers['Content-Type'] = 'application/javascript' # wrap with JSONP call if requested