GitHub review helper fails to decode emoji on Windows cp1252 locale

Open 💬 1 comment Opened Jul 29, 2026 by henrymodisett
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Symptom

The bundled gh-address-comments/scripts/fetch_comments.py helper crashes on Windows when a GitHub review contains emoji because subprocess.run(..., text=True) decodes gh output with the active cp1252 locale. The reader thread raises UnicodeDecodeError: charmap codec can't decode byte 0x8f, after which json.loads(None) raises TypeError.

Repro

  1. On Windows with Python 3.13 and the default cp1252 locale, use the Codex GitHub plugin gh-address-comments skill (observed in plugin cache version 0.1.8-2841cf9749ae).
  2. Run python fetch_comments.py for a PR whose review body contains emoji, such as the Codex Review lightbulb or thumbs-up text.
  3. Observe the subprocess reader-thread decode failure.

Setting PYTHONUTF8=1 makes the same helper invocation succeed.

Why this matters

The skill requires this helper for thread-aware review state. On a normal Windows Python installation it fails on ordinary Codex review output, blocking the documented PR feedback workflow unless the caller knows the locale workaround.

Suggested fixes

Pass encoding="utf-8" (and an explicit error policy if desired) to subprocess.run, or otherwise decode gh JSON output as UTF-8. Add a Windows regression fixture containing emoji.

Discovered

While addressing exact-head Codex review feedback on 2026-07-29.

View original on GitHub ↗

1 Comment

github-actions[bot] contributor · 29 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #35527

Powered by Codex Action