title: How to avoid tripping over UTF-8 BOM when reading files
body: <p>I'm consuming a data feed that has recently added a Unicode BOM header (U+FEFF), and my rake task is now messed up by it.</p>
  
  <p>I can skip the first 3 bytes with <code>file.gets[3..-1]</code> but is there a more elegant way to read files in Ruby which can handle this correctly, whether a BOM is present or not?</p>