fix: use UTF-8 for text file operations

This commit is contained in:
Haoran
2026-08-24 20:28:37 +08:00
parent a32a73f700
commit 199402f9d4
59 changed files with 435 additions and 289 deletions

View File

@@ -98,7 +98,7 @@ def _idle_poll(self, name, messages):
def scan_unclaimed_tasks() -> list:
unclaimed = []
for f in sorted(TASKS_DIR.glob("task_*.json")):
task = json.loads(f.read_text())
task = json.loads(f.read_text(encoding="utf-8"))
if (task.get("status") == "pending"
and not task.get("owner")
and not task.get("blockedBy")):