.bat files misinterpreted as binary #8644

Open
opened 2026-02-16 18:10:29 -05:00 by yindo · 2 comments
Owner

Originally created by @bcablelex-ship-it on GitHub (Feb 5, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

This started two updates ago. Create a new empty.bat file try to open it in the editor.
The error message is "Binary file (content cannot be displayed)"

Plugins

No plugins used

OpenCode version

v1.1.52

Steps to reproduce

This will be easy to reproduce.

Create an empty.bat file and then try to load it in the editor.

Screenshot and/or share link

Image

Operating System

Windows

Terminal

Putty

Originally created by @bcablelex-ship-it on GitHub (Feb 5, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Description This started two updates ago. Create a new empty.bat file try to open it in the editor. The error message is "Binary file (content cannot be displayed)" ### Plugins No plugins used ### OpenCode version v1.1.52 ### Steps to reproduce This will be easy to reproduce. Create an empty.bat file and then try to load it in the editor. ### Screenshot and/or share link <img width="591" height="633" alt="Image" src="https://github.com/user-attachments/assets/5316c6b2-a941-40dc-9bca-dedda1a9fa77" /> ### Operating System Windows ### Terminal Putty
yindo added the windowsbugweb labels 2026-02-16 18:10:29 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 5, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10916: OpenCode refuses to read ".PNG" images - similar binary file detection issue where uppercase file extensions are incorrectly treated as binary files

Both issues appear to be related to file extension handling and incorrect binary file detection based on extension case or format.

@github-actions[bot] commented on GitHub (Feb 5, 2026): This issue might be a duplicate of existing issues. Please check: - #10916: OpenCode refuses to read ".PNG" images - similar binary file detection issue where uppercase file extensions are incorrectly treated as binary files Both issues appear to be related to file extension handling and incorrect binary file detection based on extension case or format.
Author
Owner

@JonFranchi commented on GitHub (Feb 8, 2026):

same issue with .sh files and on linux.

@JonFranchi commented on GitHub (Feb 8, 2026): same issue with `.sh` files and on linux.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8644