fix(salary): accept BOM-prefixed UTF-8 data files (#602)

* fix(salary): accept BOM-prefixed UTF-8 data files

Fixes #594. Thanks to @rahul05ranjan for reporting the failure and identifying the decoder change.

* docs(changelog): entry for #602

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Mads Lorentzen <madslorentzen_17@hotmail.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
authored and GitHub committed 2026-10-17 20:06:36 +02:00
1 parent 1b22a38d3f
commit 822d19a2ba
3 files changed
+57 -1

No files matched your search

+7
View File
@@ -68,6 +68,13 @@ per-file diff commands.
### Fixed
- **`salary_lookup.py` accepts a BOM-prefixed `salary_data.json`** (#594, #602, `salary_lookup.py`,
`tests/test_salary_lookup.py`) - the data file is opened with `utf-8-sig`, so a file saved by
Windows PowerShell `Out-File`/`Set-Content` or by an editor that prepends a byte-order mark now
validates and loads instead of exiting 1 with "Unexpected UTF-8 BOM". Plain UTF-8 files read
identically, and malformed JSON after a BOM still reports its line and column. Reported by
rahul05ranjan; same class as #485 and #509.
- **Upstream triage emits cherry-pick suggestions in dependency order**
(`tools/upstream_triage.py`) - ready-to-run commands now list ancestors before
descendants, so a follow-up patch is not suggested before the change it edits.