zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.59k stars 3.04k forks source link

Support files with binary content #5250

Open davidshead opened 2 years ago

davidshead commented 2 years ago

Check for existing issues

Describe the bug

Using Zed 0.50.0 on macOS 12.5 (M1) I attempted to open an 8.1 megabyte log file and did not see the contents of the file displayed, only an empty window with the filename as the window title. The file was a log of slow queries from MySQL. I did try to rename it as a txt file and that did not change the behavior suggesting that the contents of the file could be having an issue being parsed?

(Update) I found the issue. It might be a character encoding issue; some of the queries involved binary contents of PDF files and removing these lines with BBEdit allowed me to open the file in Zed.

To reproduce

I tried opening the file again. Same issue. Now for fun I went and opened a different log file albeit from a different source and Zed opened up an 11 megabyte IIS log without issue.

Expected behavior

The file should open and display the text contents.

Environment

Zed 0.50.0 – /Applications/Zed.app macOS 12.5 architecture arm64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Screen Shot 2022-08-16 at 10 35 39 AM

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue

Zed.log

JosephTLyons commented 2 years ago

This feels very similar to:

It is likely that it is the same issue, but I'll leave both open because I'm not entirely sure.