npm request module encoding
<p>I'm making the following request:</p>

<pre><code>var request = require('request');
var cheerio = require('cheerio');

request(url, function(error, response, html) {

  if (!error) {
    var $ = cheerio.load(html);

    console.log(html);
}
</code></pre>

<p>And I am only getting <a href="https://i.stack.imgur.com/4VZBN.png" rel="nofollow noreferrer">jewel characters</a>. 
How can I get the correct output? </p>

<h2>Solution:</h2>

<p>I followed the suggestion on this <a href="https://stackoverflow.com/questions/12040643/nodejs-encoding-using-request">answer</a>.</p>

<pre><code>app.get('/fetchdata', function(req, res) {
  request({
    uri: urlSource,
    //null for encoding to avoid default utf-8
    encoding: null
  }, function(error, response, html) {
    //using iconv to decode to iso-8859 /latin1
      html = iconv.decode(html, 'iso-8859-1');
    console.log(html);
    ...
</code></pre>