From 432619467fc99c3374decc35cd73ec0230828793 Mon Sep 17 00:00:00 2001 From: chemicstry Date: Fri, 4 Feb 2022 15:49:56 +0200 Subject: [PATCH] Fix encoding on windows --- stm32data/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stm32data/__main__.py b/stm32data/__main__.py index 5a4ab18..fffbac2 100755 --- a/stm32data/__main__.py +++ b/stm32data/__main__.py @@ -336,7 +336,7 @@ per_mcu_files = {} def parse_documentations(): print("linking files and documents") - with open('sources/mcufinder/files.json', 'r') as j: + with open('sources/mcufinder/files.json', 'r', encoding='utf-8') as j: files = json.load(j) for file in files['Files']: file_id = file['id_file'] @@ -348,7 +348,7 @@ def parse_documentations(): 'type': file['type'], }) - with open('sources/mcufinder/mcus.json', 'r') as j: + with open('sources/mcufinder/mcus.json', 'r', encoding='utf-8') as j: mcus = json.load(j) for mcu in mcus['MCUs']: rpn = mcu['RPN']