Allow UTF-8 with BOM for features.fea

This commit is contained in:
NFSL2001 2024-05-01 22:41:03 +08:00 committed by GitHub
parent cc02ada3c4
commit 80db8cd6f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -269,7 +269,7 @@ class IncludingLexer(object):
fileobj, closing = file_or_path, False
else:
filename, closing = file_or_path, True
fileobj = open(filename, "r", encoding="utf-8-bom")
fileobj = open(filename, "r", encoding="utf-8-sig")
data = fileobj.read()
filename = getattr(fileobj, "name", None)
if closing: