When opened a non-UTF-8 file, the UTF-8 file cannot be open
Open
Nobody has claimed this yet.
status:needs-triage
- Dominant language
- Rust
- Stars
- 40.5k
- Forks
- 2.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 85
Description
Describe the bug
Windows. When I open a non-UTF-8 file and an error is thrown, continuing to open a UTF-8 file in the current nu session will also throw an error.
How to reproduce
- run
open ~\scoop\apps\msys2-cn\current\etc\mtab, this MSYS2 file is a Linux symboliclink - run
open ~\scoop\apps\msys2-cn\current\etc\shells
Expected behavior
~\scoop\apps\msys2-cn\current\etc\shells should be print
Screenshots
Use nvim Windows port to view the contents of the non-UTF-8 file:
Configuration
| key | value |
|---|---|
| version | 0.86.0 |
| branch | |
| commit_hash | 8674ba30b193f544470362dfabf71cbdeb12694c |
| build_os | windows-x86_64 |
| build_target | x86_64-pc-windows-msvc |
| rust_version | rustc 1.71.1 (eb26296b5 2023-08-03) |
| rust_channel | 1.71.1-x86_64-pc-windows-msvc |
| cargo_version | cargo 1.71.1 (7f1d04c00 2023-07-29) |
| build_time | 2023-10-18 13:18:54 +00:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | dataframe, default, extra, sqlite, trash, which, zip |
| installed_plugins |
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the open command and reproduce the two file-opening commands on Windows using the paths in the report. Trace how the failed non-UTF-8 read affects the following UTF-8 read. Done means the second open command prints the contents of shells after the first command fails.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100