Sublime Forum

[BUG] Find in Files fails due to ETX (end of text) character

#1

If a document contains an ETX (end of text) character anywhere it’s impossible to use Find in Files to search that file. No matter what you search for you get 0 results as long as that character is present anywhere in the file.

If you open the file and use regular Find you can search just fine. Only Find in Files appears to have a problem.

Version: Sublime Text 20100613
testcase.zip (248 Bytes)

0 Likes

#2

Thanks for finding the cause of this bug. It was driving me crazy! Now at least I know how to work around it.

0 Likes

#3

Files containing ETX characters are considered by Find in Files to be binary files, and hence skipped - it prints a message to the console when doing so

0 Likes

#4

It looks like most control characters (except CR, LF, TAB) make Sublime consider files as binary and skip them from search. I encountered this issue with text files containing BEL and ESC characters.

I’d say this is a too harsh restriction for what is considered a binary file, usually everything between (0, 127) is fine in a text file. To me personally, this IS a problem as I’m working on a code base with quite a few text files containing the odd control char here and there and most (if not all) other editors / grep don’t complain while searching.

(using 2.0.1 build 2217)

0 Likes