Skip to content

[Bug]: extension.yml fails to read UTF-8 encoded Chinese content on Windows #2325

Description

@WANGMAN-Echo

Bug Description

On Windows systems, when extension.yml contains UTF-8 encoded Chinese (or other non-ASCII) characters, the specify extension add command fails with the following error:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa5 in position 138: illegal multibyte sequence

Steps to Reproduce

  1. Create an extension.yml with Chinese content:
    schema_version: "1.0"
    extension:
    id: "test"
    name: "测试扩展"
    version: "1.0.0"
    description: "这是一个测试扩展"
  2. On Windows, run:
    specify extension add test --dev --from ./test-extension
  3. Error occurs: UnicodeDecodeError: 'gbk' codec can't decode...
    Environment:
  • OS: Windows 10/11
  • Python: 3.x
  • specify-cli: v0.5.0

Expected Behavior

The specify extension add command should correctly read and parse extension.yml files containing UTF-8 encoded Chinese or other non-ASCII characters, regardless of the operating system's default encoding.

Actual Behavior

The command fails with the following error:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xa5 in position 138: illegal multibyte sequence

Specify CLI Version

v0.5.0

AI Agent

opencode

Operating System

Windows 11

Python Version

Python 3.14

Error Logs

Additional Context

No response

Activity

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

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