diff --git a/cxxheaderparser/simple.py b/cxxheaderparser/simple.py index 5e84e8b..0fc8a64 100644 --- a/cxxheaderparser/simple.py +++ b/cxxheaderparser/simple.py @@ -324,6 +324,9 @@ def parse_file( 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: content = fp.read()