Skip to content

Commit 9287cd1

Browse files
0xAHAclaude
andcommitted
docs: explain why the encoding rule matters - docs/ is on GitHub Pages
The em-dash concern is a symptom, not the cause. A mis-encoded file does not merely look odd in an editor: docs/ is published to GitHub Pages, so it renders as visible mojibake to every reader of the documentation site. Banning the character would leave curly quotes, degree signs, arrows and accented names to break in exactly the same way. Adds the BOM and mojibake checks to run before committing anything written outside the editing tools. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent eea8e87 commit 9287cd1

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

claude.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,21 @@ Prefer plain ASCII in commit messages and shell-adjacent content — hyphens rat
9191
em-dashes, straight quotes rather than curly. Non-ASCII in source files is fine *via the
9292
editing tools*, never via a shell redirect.
9393

94+
**This matters more than it looks: `docs/` is published to GitHub Pages.** A file written
95+
with the wrong encoding does not just look odd in an editor — it renders as visible
96+
mojibake to every reader of the documentation site. The character is never the problem;
97+
the encoding is. Banning em-dashes would treat the symptom and still leave curly quotes,
98+
degree signs, arrows and accented names to break the same way.
99+
100+
Check before committing anything written outside the editing tools:
101+
102+
```bash
103+
# BOM (breaks JSON parsing, renders as a stray glyph in Markdown)
104+
python -c "print(open('FILE','rb').read()[:3] == b'\xef\xbb\xbf')"
105+
```
106+
107+
Then grep for `â€`, `â`, `Â` — the signatures of UTF-8 read as Windows-1252.
108+
94109
Also: `Get-Content -Raw` misreads UTF-8 and will show you mojibake that is not in the file.
95110
Verify encoding claims with `Grep` or Python, not PowerShell.
96111

0 commit comments

Comments
 (0)