Skip to content

bug: UnicodeDecodeError on non-English Windows due to missing encoding in read_text() #302

@TaeBbong

Description

@TaeBbong

Description

On non-English Windows systems (e.g. Korean, Japanese, Chinese), Strix crashes on startup with a UnicodeDecodeError when loading XML schema files.

Error

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

Root Cause

Path.read_text() without an explicit encoding parameter uses the system default encoding, which varies by OS locale:

  • Korean Windows: cp949
  • Japanese Windows: shift_jis
  • Western Windows: cp1252
  • Linux / macOS: utf-8

Since the XML and markdown files are UTF-8 encoded, this causes decoding failures on non-UTF-8 default locales.

Affected Code

  • strix/tools/registry.py_load_xml_schema()
  • strix/skills/__init__.pyload_skills()

Fix

Add encoding="utf-8" to all read_text() calls that are missing it.

PR: #301

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions