Fix Windows benchmark failure: add UTF-8 encoding to all file I/O#128
Merged
brunoborges merged 2 commits intomainfrom Mar 2, 2026
Merged
Conversation
…nerators Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
brunoborges
approved these changes
Mar 2, 2026
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions workflow benchmark
Fix Windows benchmark failure: add UTF-8 encoding to all file I/O
Mar 2, 2026
Copilot stopped work on behalf of
brunoborges due to an error
March 2, 2026 05:01
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.
The
benchmark (windows-latest)job was failing immediately after startup becausegenerate.pyandgenerateog.pycalledopen()withoutencoding='utf-8'. On Windows, the default encoding iscp1252, which chokes on the UTF-8 content present throughout the repo.The crash happened at module load time:
_load_properties(LOCALES_FILE)is called at the top level ofgenerate.py, andlocales.propertiescontains flag emojis and non-ASCII locale names (🇬🇧, 中文, العربية, etc.) that cp1252 cannot decode. Content YAML files compound this with emoji inwhyModernWinsicons (📏, 🔒, etc.).Changes
generate.py— addencoding="utf-8"to all 6open()calls (properties, YAML/JSON reads, HTML/JSON/index writes)generateog.py— same fix for all 3open()calls (properties, YAML/JSON reads, SVG writes)benchmark.yml— fix bothsnippet_countcalculations to match.yaml/.yml/.jsonfiles; the old-name '*.json'filter found onlycontent/template.json, reporting "1 snippets" instead of ~112Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.