Skip to content

fix(release): read the packaged tokenizer as UTF-8, not the Windows ANSI page - #746

Merged
JustVugg merged 1 commit into
devfrom
fix/release-verify-encoding
Aug 1, 2026
Merged

fix(release): read the packaged tokenizer as UTF-8, not the Windows ANSI page#746
JustVugg merged 1 commit into
devfrom
fix/release-verify-encoding

Conversation

@JustVugg

@JustVugg JustVugg commented Aug 1, 2026

Copy link
Copy Markdown
Owner

The v1.4.0 tag build failed on windows-x86_64:

UnicodeDecodeError: charmap codec cannot decode byte 0x90 in position 5262
FAIL: packaged k3_tokenizer.py does not parse

The file is fine — valid UTF-8, parses cleanly. The check was wrong: open() without an encoding argument uses the platform default, which on Windows is the ANSI code page (cp1252), and cp1252 cannot decode a UTF-8 file containing non-ASCII bytes.

Reproduced locally:

cp1252: FAILS -> UnicodeDecodeError
utf-8:  ok

Mine, introduced with the all-engines packaging in #737, and caught on the very first tag build that exercised it — which is what that verification step exists for, even when the thing it catches is the step itself.

No broken archive was published: the job failed before the upload, which is the whole point of verifying the artifact rather than trusting the build.

The three engines and the tokenizer were all packaged correctly; the test -x assertions above this line passed. Only the parse check was broken.

One file, workflow only. After this lands, the v1.4.0 tag needs to be moved onto it so the release job re-runs.

…NSI page

The v1.4.0 tag build failed on windows-x86_64:

  UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 5262
  FAIL: packaged k3_tokenizer.py does not parse

The file is fine -- valid UTF-8, parses cleanly. The check was wrong: open()
without an encoding uses the platform default, which on Windows is the ANSI code
page (cp1252), and cp1252 cannot decode a UTF-8 file containing non-ASCII bytes.
Reproduced locally: cp1252 raises, utf-8 parses.

Mine, introduced with the all-engines packaging in #737, and caught on the very
first tag build that exercised it -- which is what that verification step is for,
even when the thing it catches is the step itself. No broken archive was
published; the job failed before upload.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@JustVugg
JustVugg merged commit 06f31b2 into dev Aug 1, 2026
13 checks passed
@JustVugg
JustVugg deleted the fix/release-verify-encoding branch August 1, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants