title: jsdom error: utf-8 is not recognized as encoding for HTML
body: <p>I'm trying to do the simplest thing with <code>jsdom</code> and <code>jest</code> - loading up an HTML file to test its DOM:</p>
  
  <pre><code>const jsdom = require('jsdom');
  const {JSDOM} = jsdom;
  
  JSDOM.fromFile('../src/index.html'), {})
      .then(dom =&gt; {
          console.log(dom.serialize());
  
          // need to run tests here...
      })
      .catch(error =&gt; {
          console.log(error);
      });
  </code></pre>
  
  <p>And I get the following error:</p>
  
  <blockquote>
    <p>Error: Encoding not recognized: 'UTF-8' (searched as: 'utf8')</p>
  </blockquote>
  
  <p>And I found the same issue against the library <a href="https://github.com/jsdom/jsdom/issues/2060" rel="nofollow noreferrer">here</a>, which was closed without offering any solution.</p>
  
  <p>After having spent many hours, I'm buffled that I cannot find any solution to such a basic task :(</p>
  
  <p>Any idea how to overcome this issue?</p>