http.ServerResponse的write()或end()方法写出内容有中文乱码时, 首先要确定所有引用的JS文件的编码格式为UTF-8,再在write()或end()方法前加上 res.writeHead(200, ‘Content-Type:text/plain;charset=utf-8‘);
写成utf8也行
nodejs中文乱码
原文:http://my.oschina.net/lhplj/blog/343114