anomalyco / anomalyco/opencode

Read tool reports UTF-8 files with Chinese characters as "binary"

Open
#45,175 0 comments 0 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Aug 26, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

The Read tool incorrectly reports files as "Cannot read binary file" when they contain non-ASCII bytes (e.g., UTF-8 encoded Chinese comments).

Plugins

none

OpenCode version

1.18.23.0

Steps to reproduce

1.Create a UTF-8 encoded .v file with Chinese comments (e.g., //DDR3_ctrl)
2.Try to read it with the Read tool
3.Error: "Cannot read binary file"

Screenshot and/or share link

No response

Operating System

win10

Terminal

Desktop version

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.