Skip to content

fix: add missing utf-8 encoding to registry file open calls - #3810

Merged
mnriem merged 1 commit into
github:mainfrom
Quratulain-bilal:fix/registry-utf8-encoding
Jul 29, 2026
Merged

fix: add missing utf-8 encoding to registry file open calls#3810
mnriem merged 1 commit into
github:mainfrom
Quratulain-bilal:fix/registry-utf8-encoding

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Add encoding='utf-8' to 4 open() calls in extensions/init.py (lines 538, 554) and presets/init.py (lines 460, 481) that read/write registry JSON files. On Windows with non-UTF-8 locales, these would produce UnicodeDecodeError or corrupted data. The parallel code in workflows/catalog.py already specifies encoding='utf-8' correctly.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ensures extension and preset registry JSON files are consistently read and written as UTF-8 across platforms.

Changes:

  • Added explicit UTF-8 encoding to extension registry I/O.
  • Added explicit UTF-8 encoding to preset registry I/O.
Show a summary per file
File Description
src/specify_cli/extensions/__init__.py Uses UTF-8 for extension registry reads and writes.
src/specify_cli/presets/__init__.py Uses UTF-8 for preset registry reads and writes.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

@mnriem
mnriem merged commit db5802b into github:main Jul 29, 2026
14 checks passed
@mnriem

mnriem commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants