节点请求返回奇怪的字符

时间:2017-01-31 21:51:42

标签: javascript node.js encoding

var request = require("request");
var url  = "http://steamcommunity.com/market/priceoverview/?currency=1&appid=730&market_hash_name=AK-47%20%7C%20Redline%20%28Field-Tested%29";
request(url, function(error, response, body) {
    console.log(body);
});

在我的ubuntu机器上,我得到了

�+��O��%

在我的电脑(Windows)上我得到了

{"success":true,"lowest_price":"$6.38","volume":"2,370","median_price":"$6.97"}

问题是什么?我确定它之前有用..

0 个答案:

没有答案