title: Non-space characters found without seeing a doctype first. Expected <!DOCTYPE html>
body: <p>I tested my HTML5 <a href="http://www.znamykadernik.cz" rel="nofollow noreferrer">webpage</a> on w3c validator and got <a href="http://validator.w3.org/check?uri=http%3A%2F%2Fwww.znamykadernik.cz%2F&amp;charset=%28detect%20automatically%29&amp;doctype=Inline&amp;group=0&amp;user-agent=W3C_Validator%2F1.3%20http%3A%2F%2Fvalidator.w3.org%2Fservices" rel="nofollow noreferrer">errors</a> </p>
  
  <pre><code>"Non-space characters found without seeing a doctype first. Expected &lt;!DOCTYPE html&gt;"
  </code></pre>
  
  <p>But as you can see, I have doctype at first place. I found a post here <a href="https://stackoverflow.com/questions/8051941/html-validation-error-non-space-characters-found-before-doctype">HTML validation error: Non-space characters found before DOCTYPE</a> saying something about BOM files. <s>I am not sure if there can be BOM files in my source code.</s></p>
  
  <p><s>Is there any way how to find BOM files recursively for a given directory using unix commands?</s></p>
  
  <p>Is there any other reason why mentioned error displays to me?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>As watcher suggested, according to command</p>
  
  <pre><code>grep -rl $'\xEF\xBB\xBF' .
  </code></pre>
  
  <p>from topic <a href="https://stackoverflow.com/questions/204765/elegant-way-to-search-for-utf-8-files-with-bom">Elegant way to search for UTF-8 files with BOM?</a> there are no BOM source code files in my source code. So this is probably not matter of BOM files and there must be something else causing this error.</p>