fix: repair 7 mojibake note filenames

Seven hack notes had filenames whose UTF-8 bytes had been decoded as cp437 and
re-encoded, e.g. "Anil.md" stored as "A" + U+251C + U+2592 + "il.md". Only the
filenames were affected; each note's frontmatter title was already correct.

Repaired by reversing the corruption (name.encode('cp437').decode('utf-8')) and
cross-checking every result against that note's own title field. PokeRogue was
left alone - its U+00E9 cannot be cp437-encoded, proving it is genuine UTF-8 and
not mojibake.

This matters because build-wiki-data.py derives each catalog stem from the
filename and the site derives its URL slug from that. Four published URLs were
wrong and are now fixed:

  /hack/a-il/                -> /hack/anil/
  /hack/fused-adimensions/   -> /hack/fused-dimensions/
  /hack/yu-gi-oh-pok-duel/   -> /hack/yu-gi-oh-pokeduel/
  /hack/recharged-yellow-previously-known-as-pok-mon-yellow-cross/
                             -> ...-as-pokemon-yellow-cross/

The other three were already served correctly, because slugifyStem in the site
repo carries a replaceAll for the mojibake apostrophe. Those URLs are unchanged.

Fallout handled: of 19 vault references, 18 live in files build-vault-mocs.py
regenerates and were fixed by rerunning it. The one hand-written reference, in
Nuzlocke-Friendly (Vanilla+).md, was updated directly. annotate-engines.py also
keyed its ENGINE_MAP on the corrupted stem, so a future run would have silently
skipped Recharged Yellow; that key is corrected here.

Verified: zero mojibake sequences remain anywhere in the vault or this repo, all
seven notes resolve under their new names, catalog steady at 411, and the site
builds 486 pages with banners regenerated under the new slugs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
ginnoirandClaude Opus 5 committed 2026-08-15 18:11:31 -05:00
1 parent f4ed6ac880
commit b8c69ce789
2 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ ENGINE_MAP = {
"Recharged Emerald": "pokeemerald-expansion (likely)",
"Recharged Emerald Rebalanced": "pokeemerald-expansion (likely)", # rebalanced/difficulty variant
"Recharged Pink": "pokeemerald-expansion (likely)",
"Recharged Yellow (previously known as Pokémon Yellow Cross)": "pokeemerald-expansion (likely)",
"Recharged Yellow (previously known as Pokémon Yellow Cross)": "pokeemerald-expansion (likely)",
# Emerald Cross (Jaizu) — vanilla+ QoL/bugfix, no expansion → lighter decomp build
"Emerald Cross": "pokeemerald (decomp, likely)",
# --- HeartGold → hg-engine ------------------------------------------------