Repository navigation
fix: pin encoding=utf-8 on report writer and config readers - #1
Open
henryyoung96 wants to merge 1 commit into
Open
henryyoung96 wants to merge 1 commit into
henryyoung96 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Nine
Path.read_text()/Path.write_text()calls acrossscripts/run.pyand
scripts/config.pydon't specifyencoding="utf-8". On Linux/macOSCI 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 markdownabout real websites. Checked sites routinely carry CJK characters in meta
tags, titles, or JSON-LD — the report content reflects those. A
cp1252write would mangle them before the operator ever reads the verdict.
The
.envparser inconfig.pyand the YAML config reader similarlyhandle user-authored text where non-ASCII is plausible (custom UA strings,
site labels).
Changed files
scripts/run.pyai-crawlers.yaml,checklist.md,config.example.yaml(drift check),SKILL.md(wrapper sync),sites.yaml, per-site reportscripts/config.py.env,config.yaml,config.example.yaml(regeneration)All files are committed/produced as UTF-8; the I/O calls should match.