Skip to content

CLI crashes with UnicodeEncodeError when stdout is redirected on Windows (cp1252 vs '✓') #19

Description

@tonserrobo

Found while verifying #13-#18: uv run main.py generate <url> > run.log dies immediately on Windows with

UnicodeEncodeError: 'charmap' codec can't encode character '✓' in position 0: character maps to <undefined>

Interactive runs are fine; redirected stdout falls back to cp1252 and rich's legacy Windows renderer can't encode the ✓/⚠ glyphs. The error handler then crashes the same way trying to print the error. Workaround: PYTHONUTF8=1. Fix: force UTF-8 on the rich Console (or sys.stdout.reconfigure(encoding='utf-8') at startup in main.py).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions