title: How can i determine if a file is binary or text?
body: <p>I'm writing an application where i need to determine if the files provided from the user are text or not because i'm performing a search within them.</p>
  
  <p>I'm not basing on the extension, cause i want to search also in source code files for example, or any other file that have a textual content (even for not well known extensions).</p>
  
  <p>Is there a way to determine if a file is text or not?</p>