Skip to content

[Bug]: CLI does not handle UTF-8 BOM in input files #198

@Splatcrafter

Description

@Splatcrafter

AI REVIEWED

Module: cli
Files: All format handlers
Severity: High

Summary

Some tools and Windows editors add a UTF-8 BOM (EF BB BF) to files. When present, JSON/YAML/TOML parsers fail with confusing error messages because the BOM character is not valid syntax.

Suggested Fix

Strip BOM before parsing:

if (content.startsWith("\uFEFF")) {
    content = content.substring(1);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions