Skip to content

[Fix] Fix daemon utf-8 encoding for windows - #32

Merged
wangxingjun778 merged 3 commits into
mainfrom
feat/core_loop
Aug 6, 2026
Merged

[Fix] Fix daemon utf-8 encoding for windows#32
wangxingjun778 merged 3 commits into
mainfrom
feat/core_loop

Conversation

@wangxingjun778

Copy link
Copy Markdown
Member

No description provided.

…indows

- Set PYTHONIOENCODING=utf-8 in spawn_daemon env for both platforms
- Add encoding='utf-8' to all read_text/write_text in daemon, transport,
  skills/index, and host.py
- Wait for process exit (WaitForSingleObject) after TerminateProcess on
  Windows to ensure file handles are released before restart
- Increase DuckDB connect retries/backoff on Windows (5 retries, 1.0s)
  to tolerate async handle release after process termination

Root cause: Chinese Windows defaults to GBK (cp936) for Python IO,
causing daemon crash on non-GBK content → DuckDB connection leak →
file lock persists → restart fails with WinError 32.
@wangxingjun778
wangxingjun778 merged commit a7a938e into main Aug 6, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant