🐛 Fix UTF-8 errror in configuration embed and retrieve (#23303)

The feature added in commit b464a4b1a4 introduced a UTF-8 encoding error for all users where UTF-8 is not the default codepage.
This commit is contained in:
Robby Candra 2021-12-16 12:04:32 +07:00 committed by GitHub
parent 5f9140cccd
commit 6dc056f771
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ import os,subprocess,re,json,hashlib
# headers.
#
def extract_defines(filepath):
f = open(filepath).read().split("\n")
f = open(filepath, encoding="utf8").read().split("\n")
a = []
for line in f:
sline = line.strip(" \t\n\r")