nodejs を使用してブラウザに漢字の応答を表示できませんか?
jsdom.env({ html: 'http://www.baidu.com',
scripts: ['http://code.jquery.com/jquery-1.6.min.js']
}, function (err, window) {
//Use jQuery just as in a regular HTML page
var $ = window.jQuery;
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
res.end($('title').text());
});
誤った結果 : �ٶ�क�£��������
正しい結果は : 百度一下,你就知道