aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-24 12:47:16 +0100
committerGravatar jesopo2019-09-24 12:47:16 +0100
commit195381d2e531f40f3206e68a7de6f0e293feb6fd (patch)
tree71a7d7f554ef8983a5cbb8b05671b10c85d0c7af /modules
parentdon't favourite starting words when first_word is provided (diff)
signature
utf8-decode translation data
Diffstat (limited to 'modules')
-rw-r--r--modules/translate.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/translate.py b/modules/translate.py
index b2296c10..b12f0d0a 100644
--- a/modules/translate.py
+++ b/modules/translate.py
@@ -38,8 +38,8 @@ class Module(ModuleManager.BaseModule):
"client": "gtx", "sl": source_language,
"tl": target_language, "dt": "t", "q": phrase})
- if page and not page.data.startswith("[null,null,"):
- data = page.data
+ if page and not page.data.startswith(b"[null,null,"):
+ data = page.data.decode("utf8")
while ",," in data:
data = data.replace(",,", ",null,")
data = data.replace("[,", "[null,")