[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:
Ebrahim Byagowi 2020-05-21 08:37:44 +04:30
parent 759ab4fe56
commit f9b31ddaaa
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ major, minor, micro = version.split (".")
input = sys.argv[2]
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 ()
.replace ("@HB_VERSION_MAJOR@", major)
.replace ("@HB_VERSION_MINOR@", minor)