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

fix regression wrt unicode, subprocess #961

Merged
merged 1 commit into from
Sep 22, 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: 1 addition & 1 deletion src/rez/utils/_version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


# Update this value to version up Rez. Do not place anything else in this file.
_rez_version = "2.68.2"
_rez_version = "2.68.3"


# Copyright 2013-2016 Allan Johns.
Expand Down
17 changes: 9 additions & 8 deletions src/rez/utils/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,18 @@ def __init__(self, args, **kwargs):
#
text = kwargs.pop("text", None)
universal_newlines = kwargs.pop("universal_newlines", None)

if text or universal_newlines:
kwargs["universal_newlines"] = True

# fixes py3/cmd.exe UnicodeDecodeError() with some characters.
# UnicodeDecodeError: 'charmap' codec can't decode byte
# 0x8d in position 1023172: character maps to <undefined>
#
# NOTE: currently no solution for `python3+<3.6`
#
if sys.version_info[:2] >= (3, 6) and "encoding" not in kwargs:
kwargs["encoding"] = "utf-8"
# fixes py3/cmd.exe UnicodeDecodeError() with some characters.
# UnicodeDecodeError: 'charmap' codec can't decode byte
# 0x8d in position 1023172: character maps to <undefined>
#
# NOTE: currently no solution for `python3+<3.6`
#
if sys.version_info[:2] >= (3, 6) and "encoding" not in kwargs:
kwargs["encoding"] = "utf-8"

super(Popen, self).__init__(args, **kwargs)

Expand Down