utf8-decode translation data
This commit is contained in:
parent
8618f43b34
commit
195381d2e5
1 changed files with 2 additions and 2 deletions
|
@ -38,8 +38,8 @@ class Module(ModuleManager.BaseModule):
|
||||||
"client": "gtx", "sl": source_language,
|
"client": "gtx", "sl": source_language,
|
||||||
"tl": target_language, "dt": "t", "q": phrase})
|
"tl": target_language, "dt": "t", "q": phrase})
|
||||||
|
|
||||||
if page and not page.data.startswith("[null,null,"):
|
if page and not page.data.startswith(b"[null,null,"):
|
||||||
data = page.data
|
data = page.data.decode("utf8")
|
||||||
while ",," in data:
|
while ",," in data:
|
||||||
data = data.replace(",,", ",null,")
|
data = data.replace(",,", ",null,")
|
||||||
data = data.replace("[,", "[null,")
|
data = data.replace("[,", "[null,")
|
||||||
|
|
Loading…
Reference in a new issue