Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decode pack files as utf-8 instead of ascii #5106

Merged
merged 2 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion st2common/st2common/content/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down