# NousResearch/hermes-agent · Windows gateway UTF-8 encoding fix for file I/O

## Open now

- Nothing open on GitHub.

A bug on Windows where gateway update flow crashes with Unicode errors due to missing explicit UTF-8 encoding in read_text/write_text calls. Multiple fix attempts address this by passing encoding='utf-8' explicitly.

## TL;DR

- 5 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 3 PR(s) closed without merging.
- A fix was merged to main in PR #71014. Verify it addresses your case.
- **Recommended:** read PR #71014 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `unresolved`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.40`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #37423: \[Bug\]: Windows gateway hermes update flow crashes with UnicodeEncodeError/UnicodeDecodeError (bare read_text/write_text under cp1252/GBK)

## Prior & competing PRs

- **#71014: fix(windows): residual encoding gaps — MCP stdio, gateway update file-I/O, STT/TTS, desktop spawn, bootstrap ver-stub**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `apps/desktop/electron/backend-env.test.ts`, `apps/desktop/electron/backend-env.ts`, `gateway/dead_targets.py`, `gateway/delivery.py`, `gateway/platforms/qqbot/adapter.py`, `gateway/run.py`, `gateway/slash_commands.py`, `gateway/status.py`, `hermes_bootstrap.py`, `plugins/platforms/discord/adapter.py`, `plugins/platforms/feishu/adapter.py`, `plugins/platforms/google_chat/adapter.py`, `plugins/platforms/google_chat/oauth.py`, `plugins/platforms/telegram/adapter.py`, `plugins/platforms/whatsapp/adapter.py`, `tests/gateway/test_gateway_utf8_encoding.py`, `tests/test_hermes_bootstrap.py`, `tests/tools/test_mcp_stdio_encoding_handler.py`, `tools/mcp_tool.py`, `tools/transcription_tools.py` (+1 more)
- **#37424: fix(gateway): add explicit utf-8 encoding to read_text/write_text in run.py (Windows)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `d372fda6f0`, `#71078`
- **#37647: fix(gateway): pass encoding='utf-8' to all read_text/write_text in update flow (fixes #37423)**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`; refs `d372fda6f0`, `#71078`
- **#38985: fix(gateway): pass encoding="utf-8" to read_text/write_text in update path (#37423)**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#71014`, `#37423`

## Fix status

- Merged to main in PR #71014 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-07-24`.
- Subsystem: `gateway`
