mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-09-20 12:13:38 +08:00
fix: use UTF-8 for text file operations
This commit is contained in:
@@ -78,8 +78,8 @@ class MessageBus:
|
||||
def read_inbox(self, name):
|
||||
path = self.dir / f"{name}.jsonl"
|
||||
if not path.exists(): return "[]"
|
||||
msgs = [json.loads(l) for l in path.read_text().strip().splitlines() if l]
|
||||
path.write_text("") # drain
|
||||
msgs = [json.loads(l) for l in path.read_text(encoding="utf-8").strip().splitlines() if l]
|
||||
path.write_text("", encoding="utf-8") # drain
|
||||
return json.dumps(msgs, indent=2)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user