From 5f966b0b8d61e2abf003439b2f93a9bd19be798c Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 7 Nov 2020 08:41:42 +0100 Subject: Always pass an encoding to open() using text mode Otherwise we'll end up using the locale encoding. While it's usually utf-8, that's not the case on Windows. There is one place where a file with filenames is passed, not sure there so I left it and passed a explicit None. --- misc/update-gtkdoc-tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc/update-gtkdoc-tests.py') diff --git a/misc/update-gtkdoc-tests.py b/misc/update-gtkdoc-tests.py index c182fc11..6f45e348 100644 --- a/misc/update-gtkdoc-tests.py +++ b/misc/update-gtkdoc-tests.py @@ -191,7 +191,7 @@ if __name__ == '__main__': writer = GtkDocCommentBlockWriter(indent=True) logger.enable_warnings(True) - with io.open(path, 'r') as f: + with io.open(path, 'r', encoding='utf-8') as f: lines = f.readlines() chunks = [] -- cgit v1.2.1