Skip to content

Commit

Permalink
设置subprocess.Popen使用UTF-8编码
Browse files Browse the repository at this point in the history
Close #75
  • Loading branch information
TransparentLC committed Apr 22, 2024
1 parent 9b6ef8f commit af73aa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ README_ubuntu.md
README_macos.md
realesrgan-ncnn-vulkan
realesrgan-ncnn-vulkan.exe
upscayl-bin
upscayl-bin.exe
vcomp140.dll
vcomp140d.dll

Expand Down
2 changes: 2 additions & 0 deletions task.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def run(self) -> None:
cmd,
stderr=subprocess.PIPE,
universal_newlines=True,
encoding='utf-8',
creationflags=subprocess.CREATE_NO_WINDOW if os.name == 'nt' else 0,
) as p:
for line in p.stderr:
Expand Down Expand Up @@ -298,6 +299,7 @@ def run(self) -> None:
cmd,
stderr=subprocess.PIPE,
universal_newlines=True,
encoding='utf-8',
creationflags=subprocess.CREATE_NO_WINDOW if os.name == 'nt' else 0,
) as p:
for line in p.stderr:
Expand Down

0 comments on commit af73aa5

Please sign in to comment.