From c36ca1a212335dac4ec62031a03029a91ee0c30b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 4 Feb 2022 18:25:40 +1000 Subject: [PATCH] fix mojibake on congrats screen https://github.com/ankitects/anki/commit/97a0c06eae1c8cc5e6ebd6c7afbfad9f930668fb#commitcomment-65963462 --- ts/lib/i18n/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/lib/i18n/utils.ts b/ts/lib/i18n/utils.ts index 5a5365e70..64b41d256 100644 --- a/ts/lib/i18n/utils.ts +++ b/ts/lib/i18n/utils.ts @@ -75,7 +75,7 @@ export function withoutUnicodeIsolation(s: string): string { export async function setupI18n(args: { modules: ModuleName[] }): Promise { const resources = await i18n.i18nResources(args); - const json = JSON.parse(String.fromCharCode(...resources.json)); + const json = JSON.parse(new TextDecoder().decode(resources.json)); const newBundles: FluentBundle[] = []; for (const res in json.resources) {