如何设置IIS网站的默认编码? [英] How to set IIS website's default encoding?

查看:166
本文介绍了如何设置IIS网站的默认编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站是经典ASP和ASP.NET的组合



我的网页的默认编码目前是 ISO-8859-1



即使没有< meta> 标签,响应页面将被编码 ISO-8859 -1 即可。



如何将其更改为 UTF-8

解决方案

您可以尝试将头添加到该站点的HTTP响应头列表中。如果没有指定,它将以任何用户代理请求的方式传递,这可能是为什么您看到ISO-8859-1



属性=> HTTP Headers=>文件类型...=>新建类型...。分别插入您要映射的扩展名; IIS用户可能想要映射.htm,.html,...然后,对于Content类型,添加text / html; charset = utf-8(不带引号;替换您想要的字符集为utf-8; p>

FROM: http: //www.w3.org/International/O-HTTP-charset.en.php


My website is a combination of classic ASP and ASP.NET

My pages' default encoding is currently ISO-8859-1.

Even if there's no <meta> tag, the response page will be encoded ISO-8859-1.

How to change it to UTF-8?

解决方案

You could try adding the header to the HTTP Response Headers list for that site. If none is specified, it will be delivered in whatever the user agent requests, which is likely why you're seeing the ISO-8859-1

"Properties" => "HTTP Headers" => "File Types..." => "New Type...". Put in the extension you want to map, separately for each extension; IIS users will probably want to map .htm, .html,... Then, for Content type, add "text/html;charset=utf-8" (without the quotes; substitute your desired charset for utf-8;

FROM: http://www.w3.org/International/O-HTTP-charset.en.php

这篇关于如何设置IIS网站的默认编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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