Ghraven opened a new pull request, #784: URL: https://github.com/apache/burr/pull/784
### What Several text-mode `open()` calls in `burr/` do not specify an encoding, so they fall back to the platform default (`locale.getpreferredencoding()`), which is **cp1252** on Windows rather than UTF-8: | File | Purpose | |------|---------| | `burr/cli/__main__.py` | read + write JSON test-case files | | `burr/testing/__init__.py` | read JSON test cases | | `burr/integrations/streamlit.py` | read JSONL tracking log | | `burr/tracking/server/run.py` | read bundled `index.html` at startup | ### Why it matters JSON and JSONL are defined as UTF-8 (RFC 8259). On a non-UTF-8 platform, any non-ASCII content in tracked state, test cases, or the UI bundle would raise `UnicodeDecodeError` or be silently corrupted, even though the files are valid UTF-8. ### Fix Added `encoding="utf-8"` to each affected text-mode `open()` call. No behavior change on systems that already default to UTF-8, since UTF-8 is a strict superset of ASCII. ### Verification All four files still parse and import. The existing append-mode log handle in `tracking/client.py` already sets `encoding="utf-8"`, so this aligns the rest of the file I/O with that convention. Happy to adjust scope if you would prefer these split up. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
