Skip to content

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

Open
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/preset-registry-encoding-v2
Open

fix: add utf-8 encoding to registry file open calls#3816
Quratulain-bilal wants to merge 1 commit into
github:mainfrom
Quratulain-bilal:fix/preset-registry-encoding-v2

Conversation

@Quratulain-bilal

Copy link
Copy Markdown
Contributor

Add encoding='utf-8' to 4 open() calls in extensions/init.py and presets/init.py that read/write registry JSON files. On Windows with non-UTF-8 locales, these would produce UnicodeDecodeError or corrupted data.

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

Adds explicit UTF-8 handling for extension and preset registry JSON files, preventing locale-dependent failures on Windows.

Changes:

  • Read registry files as UTF-8.
  • Write registry files as UTF-8.
Show a summary per file
File Description
src/specify_cli/extensions/__init__.py Uses UTF-8 for extension registry I/O.
src/specify_cli/presets/__init__.py Uses UTF-8 for preset registry I/O.

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

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