fix: read and write text config files as UTF-8#1388
Closed
yosofbadr wants to merge 2 commits into
Closed
Conversation
Keeps the encoding fix focused by dropping the uv.lock file that was generated during local verification.
Author
|
Closing this after a stricter audit. The issue is Windows/codepage-specific and the PR only has a synthetic local fixture, not real Windows validation. I do not want to leave maintainers with a PR I cannot confidently stand behind. Sorry for the noise. |
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
Draft / waiting on broader validation.
Fixes #1345 by reading and writing TagStudio text configuration/resource files with explicit encodings instead of relying on the system default encoding.
This keeps the change focused on text encoding handling: settings are read as UTF-8 first with a fallback for legacy non-UTF-8 files, then saved as UTF-8. Related generated ignore/resource text reads and writes now also specify UTF-8. I removed an unrelated generated
uv.lockchange from this PR.Tasks Completed
uv run --extra pytest python -m pytest tests/qt/test_global_settings.py -quv run --extra ruff ruff check src/tagstudio/qt/global_settings.py src/tagstudio/core/library/refresh.py src/tagstudio/qt/resource_manager.py src/tagstudio/core/library/alchemy/library.py tests/qt/test_global_settings.py