Home Download Buy Blog Forum Support

Sublime Text thinks text file is binary

Sublime Text thinks text file is binary

Postby Arcana on Fri Jun 07, 2013 12:45 am

I did a search on all files in my project and this is the result:

Code: Select all
Searching 368 files for "myString"

--some search results appear here--

REDACTED/file_foo.js:
    <binary>

3 matches across 3 files


file_foo.js opens just fine in Sublime Text and other editors and you can edit it fine too. Why does it show up as binary? How can I troubleshoot this?
Arcana
 
Posts: 5
Joined: Tue Apr 30, 2013 5:35 pm

Re: Sublime Text thinks text file is binary

Postby jps on Mon Jun 10, 2013 9:16 am

In general, if a file contains any ASCII characters < 32, except 0x3, 0x9, 0xa, 0xc or 0xd, then it's considered binary
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Sublime Text thinks text file is binary

Postby dionjwa on Thu Aug 15, 2013 7:40 pm

That fails if you have any embedded characters in source code.

I think that this character check should be the fallback if there is no file extension, or if the file extension is ambiguous.
dionjwa
 
Posts: 1
Joined: Thu Aug 15, 2013 7:38 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 15 guests