Files
ECC/tests/scripts
Joel PodolskyandClaude Opus 5.5 8aab80221d fix(openclaw-persona-forge): print gacha output as UTF-8 on non-UTF-8 stdout
On Windows, piped stdout defaults to cp1252, so `python3 gacha.py` crashed
on its first banner line with UnicodeEncodeError. That covers agent shell
tools and gacha.sh. Reconfigure stdout to UTF-8 before main(), the same
approach instinct-cli.py took for #1855.

The existing tests set PYTHONUTF8=1, which hid the crash. The new case
forces PYTHONIOENCODING=cp1252 without PYTHONUTF8, so it reproduces on any
OS: it fails on the previous gacha.py and passes with this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 03:30:22 -04:00
..