mirror of
https://github.com/bmad-code-org/BMAD-METHOD.git
synced 2026-08-29 03:44:18 +08:00
9b80b04666
brain.py prints two kinds of arbitrary user text: --extra overlay techniques (customize.toml additional_techniques) and, on stderr, the technique name echoed back by `show NAME` when it is not found. Either can carry a character the platform default cannot encode, and print() then raises UnicodeEncodeError. The shipped catalog is cp1252-safe (its only non-ASCII is U+2014), so this is an overlay/argv path, not a default-catalog crash. pin_utf8() passes errors= through rather than letting it default: reconfigure(encoding=...) alone resets the handler to strict, which would silently downgrade stderr's POSIX default of backslashreplace and turn a diagnostic about an undecodable path into a traceback. Thanks to @armelhbobdad for catching that on #2693. Four regression tests, all four red against the unpatched script. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>