From b8c69ce789b29a782261a0bf380cf1339c53b4f2 Mon Sep 17 00:00:00 2001 From: ginnoir Date: Fri, 14 Aug 2026 14:52:41 -0500 Subject: [PATCH] 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 --- scripts/annotate-engines.py | 2 +- wiki/catalog.json | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/annotate-engines.py b/scripts/annotate-engines.py index cbaef78..d5bcc1c 100644 --- a/scripts/annotate-engines.py +++ b/scripts/annotate-engines.py @@ -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 ------------------------------------------------ diff --git a/wiki/catalog.json b/wiki/catalog.json index 6d49367..3f0d58e 100644 --- a/wiki/catalog.json +++ b/wiki/catalog.json @@ -106,7 +106,7 @@ "image_base": "https://romhacks-files.ginnoir.com", "hacks": [ { - "stem": "A FarfetchΓÇÖD Story", + "stem": "A Farfetch’D Story", "title": "Pokémon A Farfetch’D Story", "platform": "PC", "base": "RPG Maker XP / Pokemon Essentials", @@ -1412,7 +1412,7 @@ ] }, { - "stem": "A├▒il", + "stem": "Añil", "title": "Pokémon Añil", "platform": "PC", "base": "RPG Maker XP / Pokemon Essentials", @@ -1726,7 +1726,7 @@ ] }, { - "stem": "BirchΓÇÖs Folly", + "stem": "Birch’s Folly", "title": "Pokémon Birch’s Folly", "platform": "PC", "base": "RPG Maker XP / Pokemon Essentials", @@ -7864,7 +7864,7 @@ ] }, { - "stem": "Fused┬áDimensions", + "stem": "Fused Dimensions", "title": "Pokémon Fused Dimensions", "platform": "GBA", "base": "FireRed", @@ -11409,7 +11409,7 @@ ] }, { - "stem": "LetΓÇÖs Beat Mew", + "stem": "Let’s Beat Mew", "title": "Pokémon Let’s Beat Mew", "platform": "GBA", "base": "FireRed", @@ -16627,7 +16627,7 @@ ] }, { - "stem": "Recharged Yellow (previously known as Pok├⌐mon Yellow Cross)", + "stem": "Recharged Yellow (previously known as Pokémon Yellow Cross)", "title": "Pokémon Recharged Yellow (previously known as Pokémon Yellow Cross)", "platform": "GBA", "base": "Emerald", @@ -24096,7 +24096,7 @@ ] }, { - "stem": "Yu-Gi-Oh Pok├⌐Duel", + "stem": "Yu-Gi-Oh PokéDuel", "title": "Pokémon Yu-Gi-Oh PokéDuel", "platform": "GBA", "base": "FireRed",