Skip to content

Parse bom in UTF-8 .nu files #16491

@eugenesvk

Description

@eugenesvk

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 #164 issue that seems to be about BOM support, but think it only dealt with utf-16?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneeds-triageAn issue that hasn't had any proper look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions