exec('dir’,{ encoding: 'utf8’, timeout: 100000, maxBuffer: 200*1024, killSignal: 'SIGTERM’, cwd: null, env: null }, function(error,stdout,stderr){ response.writeHead(200, {’Content-Type’: 'text/plain;charset:utf-8’}); console.log(stdout); response.write(stdout); response.end(); });
输出的内容是乱码如何解决?