From 0ae749762b8f633db19d4c5e26c6ca90bbfe8d26 Mon Sep 17 00:00:00 2001 From: raphael60650 Date: Thu, 3 Jun 2021 17:53:00 +0200 Subject: [PATCH] added utf8 support to ct_config.json --- source/create_lecode_config.py | 2 +- source/patch_ct_icon.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/create_lecode_config.py b/source/create_lecode_config.py index 75ace54..0783b5f 100644 --- a/source/create_lecode_config.py +++ b/source/create_lecode_config.py @@ -2,7 +2,7 @@ import json def create_lecode_config(self): - with open("./ct_config.json") as f: + with open("./ct_config.json", encoding="utf-8") as f: ctconfig = json.load(f) with open("./file/CTFILE.txt", "w", encoding="utf-8") as ctfile, \ open("./file/RCTFILE.txt", "w", encoding="utf-8") as rctfile: diff --git a/source/patch_ct_icon.py b/source/patch_ct_icon.py index 08316bc..d675f9f 100644 --- a/source/patch_ct_icon.py +++ b/source/patch_ct_icon.py @@ -4,7 +4,7 @@ import os def patch_ct_icon(self): - with open("./ct_config.json") as f: config = json.load(f) + with open("./ct_config.json", encoding="utf8") as f: config = json.load(f) ct_icon = Image.new("RGBA", (128, 128 * (len(config["cup"]) + 2))) files = ["left", "right"]