当前位置:网站首页>The node server res.end() writes Chinese, and the solution to the problem of garbled code in the client

The node server res.end() writes Chinese, and the solution to the problem of garbled code in the client

2022-06-21 17:31:00 Yu'an_ ZhangDe

resolvent :

stay res.end Before adding a utf8 Response header for :

//  stay end  Set before   Response head   Prevent Chinese miscoding 
res.setHeader('Content-Type','text/html;charset=utf8')

Before adding

After adding

原网站

版权声明
本文为[Yu'an_ ZhangDe]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206211517547511.html