如何设置IIS网站的默认编码

如何设置IIS网站的默认编码

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

问题描述

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

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

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

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

即使没有<元> 标签,响应页面将连接codeD ISO-8859-1

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

如何将其更改为 UTF-8

推荐答案

您可以尝试添加标题到HTTP响应头列表该网站。如果没有指定,它将在任何用户代理请求交付,这可能是为什么你看到了ISO-8859-1

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

属性=>HTTP头=>文件类型...=>新型...。投入要映射,分别为每个扩展延伸; IIS用户可能会想映射的.htm或.html,......然后,内容类型,添加text / html的;字符集= UTF-8(不带引号;替换所需的字符集为UTF-8;

"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网站的默认编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 06:39