Skip to content

Commit

Permalink
Fix 'gbk' codec can't encode character '\u200b' when resolve context (#…
Browse files Browse the repository at this point in the history
…1508)

Fix 'gbk' codec can't encode character '\u200b' when resolve context.

Signed-off-by: loonghao <hal.long@outlook.com>
  • Loading branch information
loonghao authored Sep 9, 2023
1 parent bb0d148 commit 1fd1c58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rez/resolved_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,8 @@ def execute_shell(self, shell=None, parent_environ=None, rcfile=None,

# write out the native context file
context_code = executor.get_output()
with open(context_file, 'w') as f:
encoding = {"encoding": "utf-8"} if six.PY3 else {}
with open(context_file, 'w', **encoding) as f:
f.write(context_code)

quiet = quiet or \
Expand Down

0 comments on commit 1fd1c58

Please sign in to comment.