GitHub review helper fails to decode emoji on Windows cp1252 locale
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
- On Windows with Python 3.13 and the default cp1252 locale, use the Codex GitHub plugin
gh-address-commentsskill (observed in plugin cache version0.1.8-2841cf9749ae). - Run
python fetch_comments.pyfor a PR whose review body contains emoji, such as the Codex Review lightbulb or thumbs-up text. - 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.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action