mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-22 10:32:00 +00:00
On Windows, Python's open() defaults to the system locale encoding (e.g. cp1254 for Turkish, cp1252 for Western European) instead of UTF-8. The gateway already uses ensure_ascii=False in json.dumps() to preserve Unicode characters in chat messages, but the corresponding open() calls lack encoding="utf-8". This mismatch causes UnicodeEncodeError / UnicodeDecodeError when users send non-ASCII messages (Turkish, Japanese, Arabic, emoji, etc.) through Telegram, Discord, WhatsApp, or Slack on Windows. The project already fixed this for .env files in hermes_cli/config.py (line 624) but the gateway module was missed. Files fixed: - gateway/session.py: session index + JSONL transcript read/write (5 calls) - gateway/channel_directory.py: channel directory read/write (3 calls) - gateway/mirror.py: session index read + transcript append (2 calls) |
||
|---|---|---|
| .. | ||
| platforms | ||
| __init__.py | ||
| channel_directory.py | ||
| config.py | ||
| delivery.py | ||
| hooks.py | ||
| mirror.py | ||
| pairing.py | ||
| run.py | ||
| session.py | ||
| status.py | ||
| sticker_cache.py | ||