我可以为每个页面加载设置CharSet吗? (经典ASP) [英] Can I set CharSet for every page load? (Classic ASP)

查看:78
本文介绍了我可以为每个页面加载设置CharSet吗? (经典ASP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Classic ASP应用程序进行了一些更改,除非在每页中都设置了"Response.Charset =" utf-8",否则它会打破外来字母...而且页面很多...

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...

是否可以将字符集强制为每页utf-8,而不必在每页中都进行设置?

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

推荐答案

您可以确保asp文件与此标头一起提供.

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

在IIS 5.1/6中,转到网站属性,单击文件类型",并确保asp文件的内容类型为text/html;charset=UTF-8.

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具有相似的设置.转到所需的级别,在功能视图"中,双击MIME Types,找到asp,选择Edit并更新为正确的值.

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.

这篇关于我可以为每个页面加载设置CharSet吗? (经典ASP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆