Parse bom in UTF-8 .nu files
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 40.5k
- Forks
- 2.3k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 79
Description
Related problem
I was struggling to use import a nushell .nu file, getting weird closure_848 error messages until I realized by trying to copy the content of the file to another one that worked that the only difference is the original had a UTF-8 with BOM encoding
Describe the solution you'd like
The file works as BOM is a valid variant of UTF8 (as much as the whole BOM might be annoying)
Describe alternatives you've considered
Converting files to use a BOM-less variant, but given there is not good error message it's tough to rely on being aware of this tiny thing
Additional context and details
There is this closed https://github.com/nushell/nushell/issues/164 issue that seems to be about BOM support, but think it only dealt with utf-16?
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 by reproducing the use import failure with a UTF-8 BOM-prefixed .nu file, then trace Nushell's .nu parsing and decoding path. Review the related issue 164 and add coverage for the reported case; done means BOM-prefixed files import successfully like BOM-less files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100