title: Why does Node.js' fs.readFile() return a buffer instead of string?
body: <p>I'm trying to read the content of <code>test.txt</code>(which is on the same folder of the Javascript source) and display it using this code:</p>
  
  <pre><code>var fs = require("fs");
  
  fs.readFile("test.txt", function (err, data) {
      if (err) throw err;
      console.log(data);
  });
  </code></pre>
  
  <p>The content of the <code>test.txt</code> was created on <code>nano</code>:</p>
  
  <blockquote>
    <p>Testing Node.js readFile()</p>
  </blockquote>
  
  <p>And I'm getting this:</p>
  
  <pre><code>Nathan-Camposs-MacBook-Pro:node_test Nathan$ node main.js
  &lt;Buffer 54 65 73 74 69 6e 67 20 4e 6f 64 65 2e 6a 73 20 72 65 61 64 46 69 6c 65 28 29&gt;
  Nathan-Camposs-MacBook-Pro:node_test Nathan$ 
  </code></pre>