Skip to content

CLI crashes or renders poorly on Windows when output contains non-ASCII characters #39

Description

@NirrWorks

Description

The CLI can crash on Windows PowerShell when terminal output contains non-ASCII characters.

This was found while running:

uv run osmsg --last day --format psql --psql-dsn $env:DATABASE_URL --name api_last_day

The first crash happened while printing the Unicode arrow →:

UnicodeEncodeError: 'charmap' codec can't encode character '\u2192'

After replacing that symbol locally, the CLI later crashed again while rendering the Rich output table. So this is likely not limited to hardcoded symbols. It may also happen with OSM usernames or metadata containing characters from Spanish, Nepali, Chinese, Turkish, etc.

Expected Behavior
The CLI should not crash when output contains non-ASCII text. It should either print Unicode correctly or safely replace unsupported characters.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions