Skip to content

Fix UTF-16 manifests when packing sets - #54

Open
Kenley0 wants to merge 1 commit into
Leonxlnx:mainfrom
Kenley0:kenley/windows-validation
Open

Kenley0 wants to merge 1 commit into
Leonxlnx:mainfrom
Kenley0:kenley/windows-validation

Conversation

@Kenley0

@Kenley0 Kenley0 commented Dec 1, 2026

Copy link
Copy Markdown

##Problem

Windows PowerShell 5.1 writes files redirected with > using UTF-16 encoding by default.

When earshot pack reads a set directory containing a manifest.json saved this way, it opens the file as UTF-8 and raises a UnicodeDecodeError.

Solution

  • Use the existing report.read_json() helper to read set manifests.
  • Use the same helper when reading JSON sidecar files.
  • Add a regression test covering a UTF-16 manifest written in the same way as Windows PowerShell 5.1 output.

Testing

  • tests/test_make.py: 90 passed.
  • Targeted pack and manifest tests: 3 passed.
  • Full test suite: 3943 passed, 1 failed, 1709 skipped.

The only failure was test_rank_default_index_is_cached in tests/test_brief.py, which exceeded its 30 ms timing threshold (approximately 37.6 ms). This is unrelated to the modified files.

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.

1 participant