[build] State encoding explicitly for hb-version.h.in
As https://circleci.com/gh/harfbuzz/harfbuzz/140481 Traceback (most recent call last): File "./gen-hb-version.py", line 14, in <module> output_file.write (input_file.read () File "/usr/lib/python3.4/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 16: ordinal not in range(128)
This commit is contained in:
parent
759ab4fe56
commit
f9b31ddaaa
|
@ -10,7 +10,7 @@ major, minor, micro = version.split (".")
|
||||||
input = sys.argv[2]
|
input = sys.argv[2]
|
||||||
output = sys.argv[3]
|
output = sys.argv[3]
|
||||||
|
|
||||||
with open (output, "wb") as output_file, open (input, "r") as input_file:
|
with open (output, "wb") as output_file, open (input, "r", encoding='utf-8') as input_file:
|
||||||
output_file.write (input_file.read ()
|
output_file.write (input_file.read ()
|
||||||
.replace ("@HB_VERSION_MAJOR@", major)
|
.replace ("@HB_VERSION_MAJOR@", major)
|
||||||
.replace ("@HB_VERSION_MINOR@", minor)
|
.replace ("@HB_VERSION_MINOR@", minor)
|
||||||
|
|
Loading…
Reference in New Issue