[getn-hb-version.py] Open old output in UTF-8 mode as well
Fixes https://github.com/harfbuzz/harfbuzz/issues/3227
This commit is contained in:
parent
9247d24d7f
commit
6f19094398
|
@ -15,7 +15,7 @@ INPUT = sys.argv[3]
|
||||||
CURRENT_SOURCE_DIR = os.path.dirname(INPUT)
|
CURRENT_SOURCE_DIR = os.path.dirname(INPUT)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open (OUTPUT, "r") as old_output:
|
with open (OUTPUT, "r", encoding='utf-8') as old_output:
|
||||||
for line in old_output:
|
for line in old_output:
|
||||||
old_version = re.match (r"#define HB_VERSION_STRING \"(\d.\d.\d)\"", line)
|
old_version = re.match (r"#define HB_VERSION_STRING \"(\d.\d.\d)\"", line)
|
||||||
if old_version and old_version[1] == version:
|
if old_version and old_version[1] == version:
|
||||||
|
|
Loading…
Reference in New Issue