Skip to content

Invalid UTF-8 in argv becomes U+FFFD, so raw-byte file names can't be passed #66

Open

Description

@viridale

Bend's runtime decodes argv as UTF-8 and replaces invalid bytes with U+FFFD: ./args $'caf\xe9' gives caf�. A Linux file name made of raw bytes can't reach the app unchanged. The README's Platform notes mention this.

An escape scheme like Python's PEP 383 (surrogateescape) in the runtime would fix it.

Activity

  1. viridale commented on Oct 21, 2026

    @viridale
    OwnerAuthor

    Tracked upstream as bendlang/bend#1798. Its fix, bendlang/bend#1799, passes a non-UTF-8 argument to the program as its bytes, natively and under Bun. This stays open until bend-cli requires a Bend release that includes it.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions