Can I set CharSet for every page load? (Classic ASP)

空扰寡人 提交于 2019-12-08 10:17:16

问题


I have made some changes to a Classic ASP application which breaks foreign letters unless "Response.Charset = "utf-8"" is set in every page... And it's a lot of pages...

Could I force the Charset to utf-8 for every page without having to set it in each page?


回答1:


You can make sure that asp files are served with this header.

In IIS 5.1/6, go to the website properties, click "File Types" and make sure the Content Type for asp files is text/html;charset=UTF-8.

IIS 7 has a similar setting. Go to the level you need, in Features View, double-click MIME Types, find asp, select Edit and update to the correct value.



来源:https://stackoverflow.com/questions/3633917/can-i-set-charset-for-every-page-load-classic-asp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!