Skip to content

cerbero: Read/write meson config files as utf-8

Nirbheek Chauhan requested to merge nirbheek/cerbero:recipe-files-utf8 into master

The cross and native files should be written as utf-8 because that is what Meson expects, and we should read meson_options.txt as utf-8, because that is what it will always be.

Fixes the following error on macOS while reading meson_options.txt:

Traceback (most recent call last):
  File "cerbero/build/oven.py", line 451, in _cook_recipe_step
    await ret
  File "cerbero/build/recipe.py", line 82, in async_wrapped
    await stepfunc()
  File "cerbero/build/build.py", line 63, in async_call
    res = await func(*args)
  File "cerbero/build/build.py", line 1011, in configure
    self._set_option({'introspection', 'gir'}, 'gi')
  File "cerbero/build/build.py", line 771, in _set_option
    options = f.read()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/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 12: ordinal not in range(128)

Merge request reports

Loading