Skip to content

CLI crashes with UnicodeEncodeError when printing help text on Windows (cp1252 console) #154

Description

@vblearnstowritecode

Summary

On Windows with the default legacy console encoding (cp1252), any command whose help text contains non-ASCII characters (e.g. in the search --help text) crashes with UnicodeEncodeError instead of printing help.

Environment

  • OS: Windows 11
  • Shell: cmd.exe / Git Bash (default cp1252 code page)
  • Install method: npm install -g parallel-web-cli
  • Version: parallel-cli 0.9.3

Steps to reproduce

C:\> parallel-cli search --help

Actual result

  File "click\utils.py", line 539, in echo
UnicodeEncodeError: 'charmap' codec can't encode character '\u2192' in position 694
[PYI-10896:ERROR] Failed to execute script 'commands'

Expected result

Help text prints without crashing (arrow rendered or gracefully replaced).

Notes

  • Actual commands (search, extract, ...) work fine; only output containing non-ASCII characters is affected.
  • A likely fix is configuring stdout/stderr with errors="backslashreplace" at CLI startup so unencodable characters degrade gracefully on legacy code pages. Happy to open a PR if you're open to it!
  • I checked existing issues/PRs first — fix: preserve non-ASCII characters in JSON output #152 touches JSON output encoding but doesn't address this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions