Skip to content

Formatting strips a valid UTF-8 byte-order mark #2336

Backlog

Description

@oxura

What you did

Format a valid UTF-8 .bend file saved with a byte-order mark in bend2-fmt-lsp. I also ran bend main.bend --check-only before formatting; it passed.

What happened

The formatted replacement starts with import Base instead of the original U+FEFF followed by import Base. Formatting spacing shouldn't change how the file was saved. The opening bytes should still be ef bb bf.

bend version

2.0.40 (966bbb7), formatter 0.1.0

uname -sm

Linux x86_64

clang --version (the first line)

clang version 22.1.8 (Fedora 22.1.8-4.fc44)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions