From e0d82e48782fc02cdf84481dbf91f775427607fe Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 8 Jun 2022 06:37:07 -0500 Subject: [PATCH] Use utf-8 encoding when reading dose coefficient files (thanks Fabricio Gatti) --- openmc/data/effective_dose/dose.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/data/effective_dose/dose.py b/openmc/data/effective_dose/dose.py index 6ceb2c09e0..eb8fe9f356 100644 --- a/openmc/data/effective_dose/dose.py +++ b/openmc/data/effective_dose/dose.py @@ -23,7 +23,7 @@ def _load_dose_icrp116(): """Load effective dose tables from text files""" for particle, filename in _FILES: path = Path(__file__).parent / filename - data = np.loadtxt(path, skiprows=3) + data = np.loadtxt(path, skiprows=3, encoding='utf-8') data[:, 0] *= 1e6 # Change energies to eV _DOSE_ICRP116[particle] = data