I am trying to get the correct encoding with request.
request.get({
\"uri\":\'http://www.bold.dk/tv/\',
\"encoding\": \"text/html;charset=\'charset=u
I have the same problem, with request v2.88.0
.
Refer to woolfi makkinan's answer, I got a simple way to solve the problem.
request.get({
"uri": 'http://www.bold.dk/tv/',
"encoding": "text/html;charset='charset=utf-8'",
"gzip": true // notice this config
},
function(err, resp, body){
console.log(body);
}
);
Add gzip: true
to request
options, request
will deal with gzip, and then blob can convert to string correctly.