Skip to content

Conversation

@TaeBbong
Copy link

@TaeBbong TaeBbong commented Feb 3, 2026

Summary

  • Path.read_text() without encoding uses the system default (e.g. cp949 on Korean Windows, shift_jis on Japanese Windows), causing UnicodeDecodeError when reading UTF-8 files
  • Added encoding="utf-8" to all read_text() calls that were missing it:
    • strix/tools/registry.py — XML schema loading
    • strix/skills/__init__.py — skill markdown loading

Solves #302

Error reproduced

Error loading schema file ...\finish_actions_schema.xml:
'cp949' codec can't decode byte 0xe2 in position 2495: illegal multibyte sequence

Test plan

  • Verify Strix launches without encoding errors on non-English Windows (Korean, Japanese, etc.)
  • Verify no regression on Linux/macOS where default encoding is already UTF-8

- Specify encoding="utf-8" in registry.py _load_xml_schema()
- Specify encoding="utf-8" in skills/__init__.py load_skills()
- Prevents cp949/shift_jis/cp1252 decoding errors on non-English Windows
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 3, 2026

Greptile Overview

Greptile Summary

Fixed encoding issues on non-English Windows systems by adding explicit UTF-8 encoding to Path.read_text() calls.

  • Added encoding="utf-8" to strix/tools/registry.py:51 - prevents UnicodeDecodeError when loading XML schema files on systems with non-UTF-8 default encoding (e.g., cp949 on Korean Windows)
  • Added encoding="utf-8" to strix/skills/__init__.py:133 - prevents UnicodeDecodeError when loading skill markdown files
  • All read_text() calls in the codebase have been updated (verified via codebase search)

The changes are minimal, focused, and directly address the reported error without modifying any logic.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • The changes are minimal and surgical - only adding explicit UTF-8 encoding parameters to two read_text() calls. This is a best practice that fixes real encoding errors on non-English systems while maintaining full backward compatibility on systems where UTF-8 is already the default. No logic changes, no new dependencies, and the fix directly addresses the documented error.
  • No files require special attention

Important Files Changed

Filename Overview
strix/tools/registry.py Added UTF-8 encoding to XML schema file loading to prevent UnicodeDecodeError on non-English systems
strix/skills/init.py Added UTF-8 encoding to skill markdown file loading to prevent UnicodeDecodeError on non-English systems

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.

1 participant