fix: use utf-8 for local tracking text files#790
Open
Ghraven wants to merge 2 commits into
Open
Conversation
andreahlert
requested changes
May 26, 2026
Collaborator
andreahlert
left a comment
There was a problem hiding this comment.
Thanks for the fix. One spot in the same file looks missed: backend.py:524 reads graph.json text-mode without encoding="utf-8". Same class of bug, and client writes it as UTF-8 (client.py:420).
async with aiofiles.open(graph_file, encoding="utf-8") as f:Could you include that line in this PR as well?
Author
|
Thank you for catching that missed spot. I added the same explicit |
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.
Summary
Thanks for maintaining Burr. This PR makes the local tracking backend text-file reads and writes use explicit UTF-8 encoding.
What changed
encoding="utf-8"to annotation JSONL reads and writes inLocalBackendencoding="utf-8"when readingchildren.jsonlBefore / after
Before, these JSONL text files used the platform default encoding, which can vary on Windows and other non-UTF-8 locale environments.
After, the local backend reads and writes these text files consistently as UTF-8.
Verification
python -m py_compile burr/tracking/server/backend.pygit diff --check