You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
This main part of this issue seems to be caused by rust-lang/rust#23344. I'm not really sure if there's an easy fix unfortunately. That said, I'm still not totally sure why the issue only shows up when opening a file directly. I'm guessing it has to do with stdin only reading in UTF-16 pairs or something so there is no need to worry about half pairs.
The other part should be split into a separate issue (I'd appreciate it if you would do so). We should not be separating the line number prefix write from the data write to avoid weird output like this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
At least on Windows, it prints
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.
The text was updated successfully, but these errors were encountered: