nodejs返回json数据中文乱码
来源:5-7 开发路由(博客列表路由)(上)

山顶洞人j
2019-08-09
nodejs返回json数据中文乱码,文件的编码是utf-8的,设置了setting.json的 “files.autoGuessEncoding”: true,可是浏览器依然乱码,网上找了好多方法都无法解决这个问题,烦请老师解答下,非常感谢!
写回答
3回答
-
双越
2019-08-15
试一下 res.header("Content-Type", "application/json;charset=utf-8"); 设置编码
012019-08-19 -
山顶洞人j
提问者
2019-08-15
response header 中的信息
00 -
双越
2019-08-09
看下浏览器 network 中,本次请求的 response header 中的编码
032019-08-15