Repository navigation
fix(io): read and write TagStudio-owned text files as UTF-8 - #1575
Closed
sanketpatel32 wants to merge 1 commit into
Closed
sanketpatel32 wants to merge 1 commit into
sanketpatel32 wants to merge 1 commit into
Conversation
settings.toml, .compiled_ignore, the .ts_ignore template/migration write, and bundled text resources are now always handled as UTF-8 instead of the system default encoding. Prevents UnicodeDecodeError and nonconforming TOML/JSON on systems with non-UTF-8 codepages (e.g. cp932 Windows), and on libraries shared between systems. Refs TagStudioDev#1345
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
Fixes #1345. TagStudio-owned text files are now always read and written as UTF-8 instead of relying on the system default encoding (e.g.
cp932on Japanese Windows orcp1252), which could causeUnicodeDecodeErrors or nonconforming TOML/JSON — and corrupt libraries shared between systems:app_settings.py:settings.tomlread/writerefresh.py:.compiled_ignore(ripgrep patterns can legitimately contain non-ASCII characters)ignore.py:.ts_ignoretemplate readmigrations.py:.ts_ignorewrite during the v2 migrationresource_manager.py: bundled text resources (e.g. Qt stylesheets)Tasks Completed