Sublime Text 'find in files' gives <binary> in the find results
Asked Answered
M

4

13

HotKey: Shift+Ctrl+F

Correct result: enter image description hereError results,

you can find the results just show as '<binary>'.I've searched this problem in google,but get nothing,

Error results

Here is log text. Thanks for anyone give suggestion

Mutton answered 25/9, 2014 at 3:50 Comment(0)
C
3

The file most likely contains non UTF-8 encoded characters, binary characters or the content encoding cannot be guessed. Thus, it is not reliable to show search result summary.

Cumulative answered 25/9, 2014 at 6:0 Comment(2)
I copy the text and save as utf-8,still show <binary>.If I copy the part of text,then search,the results shows correct.full text nearlly about 8M,if it's results too big to show ?Mutton
Hmm. That could be one reason - sounds like a cheap workaround instead of putting "This file is too big to show search result summary". Or the other reason is that there is a bad character somewhere in the text stream, making it appear as binary.Cumulative
G
3

need convert control characters

java -jar replacecontrol.jar *filepath*

replacecontrol.jar

Gerbil answered 7/6, 2017 at 10:0 Comment(2)
Could you elaborate on what exactly this tool does to exactly what control characters? It would also be helpful to open-source it so we can read it. Even the readme in your repo doesn't say anything about what this does or how or why.Partly
this worked for me.Malmsey
C
1

From Sublimetext Forum

In general, if a file contains any ASCII characters < 32, except 0x3, 0x9, 0xa, 0xc or 0xd, then it’s considered binary

Reading that I searched [\x00-\x09] and found a \x02 Then deleted that character; Problem disappeared

Next step would have been [\x0B-\x1F] as x0A is newline But I did not need it

Cleanthes answered 4/4, 2022 at 10:16 Comment(0)
T
0

u can use regexp [^[:print:]\t\r\n] to replace all text, then u can find your result without binary.

Tungstite answered 21/10, 2022 at 7:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.