I view my query with Cheerio as follows:
var url = http://shop.nag.ru/catalog/16939.IP-videonablyudenie-OMNY/16944.IP-kamery-OMNY-c-vario-obektivom/16704.OMNY-1000-PRO; request.get(url, function (err, response, body) { console.log(body); $ = cheerio.load(body); console.log($(".description").html()); });
And as an output, I see the contents, but in an unreadable weird encoding:
//Plain body console.log(body) (ps russian chars): <h1><span style="font-size: 16px;"> 3 IP HD OMNY - </span></h1><p style // cheerio console.log $(".description").html() <h1><span style="font-size: 16px;">&
Destination URL in UTF-8 format. So why is Cheerio breaking my encoding?
Trying to use iconv to encode my body:
var body1 = iconv.decode(body, "utf-8");
but console.log($(".description").html()); still returning weird text.
source share