diff --git a/slither/slither.py b/slither/slither.py index 78a2bce7d..39435bf8c 100644 --- a/slither/slither.py +++ b/slither/slither.py @@ -65,7 +65,7 @@ class Slither(SlitherSolc): for path, ast in cryticCompile.asts.items(): self._parse_contracts_from_loaded_json(ast, path) - with open(path) as f: + with open(path, encoding='utf8', newline='') as f: self.source_code[path] = f.read() self._detectors = []