diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c69ede37dd..6f24301dfe 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -41,6 +41,8 @@ Fixed Contributed by @guzzijones +* StackStorm now explicitly decodes pack files as utf-8 instead of implicitly as ascii (bug fix) #5106 + Removed ~~~~~~~~ * Removed check-licence script (cleanup) #5092 diff --git a/st2common/st2common/content/loader.py b/st2common/st2common/content/loader.py index 3baa1e767b..efd9a2c005 100644 --- a/st2common/st2common/content/loader.py +++ b/st2common/st2common/content/loader.py @@ -243,7 +243,7 @@ def load(self, file_path, expected_type=None): return result def _load(self, parser_func, file_path): - with open(file_path, 'r') as fd: + with open(file_path, 'r', encoding='utf-8') as fd: try: return parser_func(fd) except ValueError: