From b9714440a66df1259494a179784f58913616a257 Mon Sep 17 00:00:00 2001 From: David Kellner <52860029+kellnerd@users.noreply.github.com> Date: Sun, 17 Oct 2021 17:05:51 +0200 Subject: [PATCH] build: Explicitly read files as UTF-8 Otherwise the OS default encoding is used which leads to errors on Windows. --- tools/generate_README.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/generate_README.py b/tools/generate_README.py index bd92176..8293c20 100755 --- a/tools/generate_README.py +++ b/tools/generate_README.py @@ -20,7 +20,7 @@ re_keyval = re.compile(r'^[\s\*/]+@(\S+)\s+(.+)\s*$', re.IGNORECASE) items = list() for jsfilename in sorted(glob.glob('*.user.js')): in_header = False - with open(jsfilename) as jsfile: + with open(jsfilename, encoding='utf-8') as jsfile: d = defaultdict(list) for line in jsfile: if not in_header and re_start_header.search(line):