Skip to content

cat doesn't print files with "invalid unicode" #1240

@TheGoddessInari

Description

@TheGoddessInari

At least on Windows, it prints

1  cat: text was not valid unicode

when attempting to cat -n or cat -b a file with presumably invalid unicode. Without any other arguments, it prints a blank line. This is an important distinction because GNU cat, and redirecting input (like cat < file) both work. Only when passing the file via arguments does it fail in this way.

Notably, this fails with most executables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions