Handle BOM input in liquidity generator

Read liquidity generator input with utf-8-sig so Windows-created JSON/YAML files with a BOM work.
This commit is contained in:
Klotzkette
2026-05-19 11:46:16 -07:00
committed by GitHub
parent bcbf7909b0
commit 118f287f6d
2 changed files with 2 additions and 2 deletions
@@ -81,7 +81,7 @@ except ImportError:
# ----------------------------------------------------------------------------
def load_input(path: Path) -> dict[str, Any]:
text = path.read_text(encoding="utf-8")
text = path.read_text(encoding="utf-8-sig")
if path.suffix.lower() in {".yaml", ".yml"}:
if yaml is None:
return load_simple_yaml(text, path)
@@ -81,7 +81,7 @@ except ImportError:
# ----------------------------------------------------------------------------
def load_input(path: Path) -> dict[str, Any]:
text = path.read_text(encoding="utf-8")
text = path.read_text(encoding="utf-8-sig")
if path.suffix.lower() in {".yaml", ".yml"}:
if yaml is None:
return load_simple_yaml(text, path)