diff options
| author | Nik <werwolv98@gmail.com> | 2022-12-16 15:23:04 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-16 06:23:04 -0800 |
| commit | 0474095a40ba6cb729064654d22efd88f91958d6 (patch) | |
| tree | 12f26a43c6f16477bdac1b24a7991599662138e1 /backend/plugin.py | |
| parent | 346f80beb31d1e2a95d31a5997b5a233d08e0645 (diff) | |
| download | decky-loader-0474095a40ba6cb729064654d22efd88f91958d6.tar.gz decky-loader-0474095a40ba6cb729064654d22efd88f91958d6.zip | |
Potentially fix locale issues (#284)v2.4.6-pre5
Diffstat (limited to 'backend/plugin.py')
| -rw-r--r-- | backend/plugin.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backend/plugin.py b/backend/plugin.py index a1d8394a..e21d5bde 100644 --- a/backend/plugin.py +++ b/backend/plugin.py @@ -27,9 +27,9 @@ class PluginWrapper: self.version = None - json = load(open(path.join(plugin_path, plugin_directory, "plugin.json"), "r")) + json = load(open(path.join(plugin_path, plugin_directory, "plugin.json"), "r", encoding="utf-8")) if path.isfile(path.join(plugin_path, plugin_directory, "package.json")): - package_json = load(open(path.join(plugin_path, plugin_directory, "package.json"), "r")) + package_json = load(open(path.join(plugin_path, plugin_directory, "package.json"), "r", encoding="utf-8")) self.version = package_json["version"] @@ -112,7 +112,7 @@ class PluginWrapper: d["res"] = str(e) d["success"] = False finally: - writer.write((dumps(d)+"\n").encode("utf-8")) + writer.write((dumps(d, ensure_ascii=False)+"\n").encode("utf-8")) await writer.drain() async def _open_socket_if_not_exists(self): @@ -140,7 +140,7 @@ class PluginWrapper: return async def _(self): if await self._open_socket_if_not_exists(): - self.writer.write((dumps({"stop": True})+"\n").encode("utf-8")) + self.writer.write((dumps({ "stop": True }, ensure_ascii=False)+"\n").encode("utf-8")) await self.writer.drain() self.writer.close() get_event_loop().create_task(_(self)) @@ -151,7 +151,7 @@ class PluginWrapper: async with self.method_call_lock: if await self._open_socket_if_not_exists(): self.writer.write( - (dumps({"method": method_name, "args": kwargs})+"\n").encode("utf-8")) + (dumps({ "method": method_name, "args": kwargs }, ensure_ascii=False) + "\n").encode("utf-8")) await self.writer.drain() line = bytearray() while True: |
