title: Node Buffer.prototype.toString returns incomplete string
body: <p>Trying to parse a csv in node using a <code>Buffer</code> but the return value seems to be incomplete:</p>
  
  <p>Code: </p>
  
  <pre><code>app.post('/upload/import', function(req, res) {
  
      var base64str = req.body // which returns data:text/csv;base64,VGhpcyBpcyBhIHRoaW5nDTQxMDIxMjE4NzINOTA5ODc2MTI0NQ0yOTIxMjc
      var data = base64str.substring(base64str.indexOf(',') + 1, base64str.length); \\ remove 'data:text/csv;base64,
      var encoded = new Buffer(data, 'base64').toString('ascii');
      console.log(encoded); // returns '2910387473thing'
  
  });
  </code></pre>
  
  <p>When I run this exact base64 string through a base64 service I get this result: </p>
  
  <pre><code>This is a thing
  4102121872
  9098761245
  2921278901
  9981223489
  6482034847
  3948820123
  8483920383
  3849201837
  2910387473
  </code></pre>
  
  <p>The base64 string is <code>VGhpcyBpcyBhIHRoaW5nDTQxMDIxMjE4NzINOTA5ODc2MTI0NQ0yOTIxMjc4OTAxDTk5ODEyMjM0ODkNNjQ4MjAzNDg0Nw0zOTQ4ODIwMTIzDTg0ODM5MjAzODMNMzg0OTIwMTgzNw0yOTEwMzg3NDcz</code></p>
  
  <p>This is the site where I've verified my base64 is correct: <a href="https://www.base64decode.org/" rel="nofollow">https://www.base64decode.org/</a></p>
  
  <p>What is happening to truncate my data?</p>