Use utf-8-sig to open files by default

This commit is contained in:
Dustin Spicuzza 2021-01-02 19:22:22 -05:00
parent 23b95f09f2
commit 43431f3fe4

View File

@ -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()