From 968bd1b27aae04d7f61dac33515c70fca9fbfc78 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 11 Jun 2021 20:12:38 +1000 Subject: [PATCH] specific encoding of strings.json https://forums.ankiweb.net/t/win10-build-error-unicodedecodeerror-gbk-codec-cant-decode-byte-0x91/10714 --- pylib/anki/_backend/genfluent.py | 2 +- ts/lib/genfluent.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pylib/anki/_backend/genfluent.py b/pylib/anki/_backend/genfluent.py index 9a47382e0..09330265c 100644 --- a/pylib/anki/_backend/genfluent.py +++ b/pylib/anki/_backend/genfluent.py @@ -8,7 +8,7 @@ from typing import List, Literal, TypedDict import stringcase strings_json, outfile = sys.argv[1:] -modules = json.load(open(strings_json)) +modules = json.load(open(strings_json, encoding="utf8")) class Variable(TypedDict): diff --git a/ts/lib/genfluent.py b/ts/lib/genfluent.py index c92ae8503..3944aad5f 100644 --- a/ts/lib/genfluent.py +++ b/ts/lib/genfluent.py @@ -8,7 +8,7 @@ from typing import List, Literal, TypedDict import stringcase strings_json, outfile = sys.argv[1:] -modules = json.load(open(strings_json)) +modules = json.load(open(strings_json, encoding="utf8")) class Variable(TypedDict):