Use utf-8-sig to open files by default
This commit is contained in:
parent
23b95f09f2
commit
43431f3fe4
@ -324,6 +324,9 @@ def parse_file(
|
|||||||
Simple function to parse a header from a file and return a data structure
|
Simple function to parse a header from a file and return a data structure
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if encoding is None:
|
||||||
|
encoding = "utf-8-sig"
|
||||||
|
|
||||||
with open(filename, encoding=encoding) as fp:
|
with open(filename, encoding=encoding) as fp:
|
||||||
content = fp.read()
|
content = fp.read()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user