From 6f1909439862cc37246aba55a85c0a072b945dff Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 23 Sep 2021 08:39:29 -0600 Subject: [PATCH] [getn-hb-version.py] Open old output in UTF-8 mode as well Fixes https://github.com/harfbuzz/harfbuzz/issues/3227 --- src/gen-hb-version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gen-hb-version.py b/src/gen-hb-version.py index 879811ffc..4fac0a0e5 100755 --- a/src/gen-hb-version.py +++ b/src/gen-hb-version.py @@ -15,7 +15,7 @@ INPUT = sys.argv[3] CURRENT_SOURCE_DIR = os.path.dirname(INPUT) try: - with open (OUTPUT, "r") as old_output: + with open (OUTPUT, "r", encoding='utf-8') as old_output: for line in old_output: old_version = re.match (r"#define HB_VERSION_STRING \"(\d.\d.\d)\"", line) if old_version and old_version[1] == version: