title: node.js readfile error with utf8 encoded file on windows
body: <p>I'm trying to load a UTF8 json file from disk using node.js (0.10.29) on Windows 8.1. The following is the code that runs:</p>
  
  <pre><code>var http = require('http');
  var utils = require('util');
  var path = require('path');
  var fs = require('fs');
  
  var myconfig;
  fs.readFile('./myconfig.json', 'utf8', function (err, data) {
      if (err) {
          console.log("ERROR: Configuration load - " + err);
          throw err;
      } else {
          try {
              myconfig = JSON.parse(data);
              console.log("Configuration loaded successfully");
          }
          catch (ex) {
              console.log("ERROR: Configuration parse - " + err);
          }
  
  
      }
  });
  </code></pre>
  
  <p>I get the following error when I run this:</p>
  
  <pre><code>SyntaxError: Unexpected token ´╗┐
      at Object.parse (native)
      ...
  </code></pre>
  
  <p>Now, when I change the file encoding (using Notepad++) to ANSI, it works without a problem.</p>
  
  <p>Any ideas why this is the case? Whilst development is being done on Windows the final solution will be deployed to a variety of non-Windows servers, I'm worried that I'll run into issues on the server end if I deploy an ANSI file to Linux, for example.</p>
  
  <p>According to my searches here and via Google the code should work on Windows as I am specifically telling it to expect a UTF-8 file.</p>
  
  <p>Sample config I am reading:</p>
  
  <pre><code>{
      "ListenIP4": "10.10.1.1",
      "ListenPort": 8080
  }
  </code></pre>