Skip to content

fix: add utf-8 encoding to extension and preset registry file I/O (import of github/spec-kit#3834) - #123

Open
one-kash wants to merge 1 commit into
mainfrom
import/pr-3834
Open

fix: add utf-8 encoding to extension and preset registry file I/O (import of github/spec-kit#3834)#123
one-kash wants to merge 1 commit into
mainfrom
import/pr-3834

Conversation

@one-kash

Copy link
Copy Markdown

Imported from upstream PR github#3834
Original author: @Quratulain-bilal
Original head branch: fix/extensions-registry-encoding


Summary

Add explicit encoding='utf-8' to extension and preset registry file I/O to prevent corruption on non-UTF-8 Windows locales.

Changes

  • extensions/__init__.py: Added encoding='utf-8' to registry read/write
  • presets/__init__.py: Added encoding='utf-8' to registry read/write

Both extension and preset registry read/write calls used platform-default
encoding, which on Windows (cp1252/UTF-16) would corrupt UTF-8 JSON data
or raise UnicodeDecodeError. Explicitly specify encoding='utf-8' to match
the JSON contract.

Assisted-by: opencode (autonomous)
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.

2 participants