fix: utf-8 support for gen-suite.py

This commit is contained in:
Anya Lin
2026-05-04 14:51:52 +08:00
parent fffc00e37f
commit dbd1107d24

View File

@@ -52,7 +52,7 @@ def add_product(elem):
if Path(file).is_file() == False: if Path(file).is_file() == False:
continue continue
with open(file, "r") as f: with open(file, "r", encoding='utf-8') as f:
data = json.load(f) data = json.load(f)
if data.get("AddRemoveInfo") and data.get("IsSTI") is False: if data.get("AddRemoveInfo") and data.get("IsSTI") is False:
sapCode = data.get("SAPCode") sapCode = data.get("SAPCode")
@@ -93,7 +93,7 @@ def add_product(elem):
for d in depList: for d in depList:
esdDir = f"{prodsDir}/{d.get("SAPCode")}" esdDir = f"{prodsDir}/{d.get("SAPCode")}"
depJson = os.path.join(Path(esdDir), "Application.json") depJson = os.path.join(Path(esdDir), "Application.json")
with open(depJson, "r") as f: with open(depJson, "r", encoding='utf-8') as f:
depData = json.load(f) depData = json.load(f)
size = calc_sizes(depData) size = calc_sizes(depData)
dPkg = ET.SubElement(deps, "Dependency") dPkg = ET.SubElement(deps, "Dependency")