Skip to content

Commit a4e1a54

Browse files
fix: add UTF-8 encoding for subprocess calls on Windows
On Windows, subprocess.Popen/run with text=True defaults to CP1252 encoding instead of UTF-8. This causes UnicodeDecodeError when Claude outputs characters outside the CP1252 codepage. Add explicit encoding="utf-8" and errors="replace" parameters to all subprocess calls that use text=True. Files modified: - parallel_orchestrator.py (3 locations) - start.py (2 locations) - start_ui.py (1 location) Closes #138 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b0490be commit a4e1a54

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

start.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ def run_spec_creation(project_dir: Path) -> bool:
231231
check=False, # Don't raise on non-zero exit
232232
cwd=str(Path(__file__).parent), # Run from project root
233233
stderr=subprocess.PIPE,
234-
text=True
234+
text=True,
235+
encoding="utf-8", # Fix Windows CP1252 encoding issue (#138)
236+
errors="replace",
235237
)
236238

237239
# Check for authentication errors in stderr
@@ -403,7 +405,9 @@ def run_agent(project_name: str, project_dir: Path) -> None:
403405
cmd,
404406
check=False,
405407
stderr=subprocess.PIPE,
406-
text=True
408+
text=True,
409+
encoding="utf-8", # Fix Windows CP1252 encoding issue (#138)
410+
errors="replace",
407411
)
408412

409413
# Check for authentication errors

start_ui.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ def check_node() -> bool:
127127
result = subprocess.run(
128128
["node", "--version"],
129129
capture_output=True,
130-
text=True
130+
text=True,
131+
encoding="utf-8", # Fix Windows CP1252 encoding issue (#138)
132+
errors="replace",
131133
)
132134
print(f" Node.js version: {result.stdout.strip()}")
133135
except Exception:

0 commit comments

Comments
 (0)