Skip to content

fix: pin encoding=utf-8 on report writer and config readers - #1

Open
henryyoung96 wants to merge 1 commit into
tigerless-labs:mainfrom
henryyoung96:fix/report-write-encoding
Open

henryyoung96 wants to merge 1 commit into
tigerless-labs:mainfrom
henryyoung96:fix/report-write-encoding

Conversation

@henryyoung96

Copy link
Copy Markdown

What

Nine Path.read_text() / Path.write_text() calls across scripts/run.py
and scripts/config.py don't specify encoding="utf-8". On Linux/macOS
CI this works by coincidence (locale default is UTF-8); on a Windows or
non-UTF-8 locale machine it silently corrupts non-ASCII text.

Why it matters for seo-ops specifically

The report writer (path.write_text(report) at line 1696) emits markdown
about real websites. Checked sites routinely carry CJK characters in meta
tags, titles, or JSON-LD — the report content reflects those. A cp1252
write would mangle them before the operator ever reads the verdict.

The .env parser in config.py and the YAML config reader similarly
handle user-authored text where non-ASCII is plausible (custom UA strings,
site labels).

Changed files

file callsites what they read/write
scripts/run.py 6 ai-crawlers.yaml, checklist.md, config.example.yaml (drift check), SKILL.md (wrapper sync), sites.yaml, per-site report
scripts/config.py 3 .env, config.yaml, config.example.yaml (regeneration)

All files are committed/produced as UTF-8; the I/O calls should match.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant