diff --git a/montepy/input_parser/input_file.py b/montepy/input_parser/input_file.py index 00c60952..461306aa 100644 --- a/montepy/input_parser/input_file.py +++ b/montepy/input_parser/input_file.py @@ -79,7 +79,7 @@ def open(self, mode, encoding="ascii"): :type encoding: str :returns: self """ - self._fh = open(self.path, mode, encoding="ascii") + self._fh = open(self.path, mode, encoding=encoding) return self def __enter__(self): diff --git a/montepy/mcnp_problem.py b/montepy/mcnp_problem.py index 802b8d5d..9984a2d6 100644 --- a/montepy/mcnp_problem.py +++ b/montepy/mcnp_problem.py @@ -261,7 +261,7 @@ def parse_input(self, check_input=False, encoding="ascii"): try: for i, input in enumerate( input_syntax_reader.read_input_syntax( - self._input_file, self.mcnp_version + self._input_file, self.mcnp_version, encoding=encoding ) ): self._original_inputs.append(input)