pmb: use UTF-8 in pmb.helpers.file.replace()

Without this fix, `pmbootstrap pkgrel_bump` does not work with some
APKBUILDs with special characters.
This commit is contained in:
Oliver Smith 2018-07-09 22:57:54 +02:00
parent 614e7f3511
commit 2b062a1272

View file

@ -24,12 +24,12 @@ import pmb.helpers.run
def replace(path, old, new):
text = ""
with open(path, 'r') as handle:
with open(path, "r", encoding="utf-8") as handle:
text = handle.read()
text = text.replace(old, new)
with open(path, 'w') as handle:
with open(path, "w", encoding="utf-8") as handle:
handle.write(text)