Skip to content

Commit 7731b1f

Browse files
author
Raven
committed
Fix encoding problem in powershell handler utility
1 parent c601d8c commit 7731b1f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

utilities/util_powershell_handler.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def run_powershell_script(
4646
stdout=subprocess.PIPE,
4747
stderr=subprocess.PIPE,
4848
text=True,
49+
encoding="utf-8",
50+
errors="replace",
4951
bufsize=1,
5052
creationflags=creationflags,
5153
)
@@ -143,6 +145,8 @@ def run_powershell_command(
143145
stdout=subprocess.PIPE,
144146
stderr=subprocess.PIPE,
145147
text=True,
148+
encoding="utf-8",
149+
errors="replace",
146150
bufsize=1,
147151
creationflags=creationflags,
148152
)

0 commit comments

Comments
 (0)