当前位置: 首页 > 图文教程 > 网络编程 > ASP > Asp Object 之:Charset

ASP
Asp Object 之:End
Asp Object 之:ServerVariables
Asp Object 之:Expires
Asp Object 之:ExpiresAbsolute
Asp Object 之:Flush
Asp Object 之:Form
Asp Object 之:IsClientConnected
Asp Object 之:PICS
Asp Object 之:QueryString
Asp Object 之:Redirect
Asp Object 之:Request.Cookies
Asp Object 之:Request
Asp Object 之:Response.Cookies
Asp Object 之:Response
Asp Object 之:Status
Asp Object 之:TotalBytes
Asp Object 之:Write
用ASP.Net编写留言本
如何把ASP编写成DLL(1)
如何把ASP编写成DLL(2)

ASP 中的 Asp Object 之:Charset


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 45 ::
收藏到网摘: n/a

Charset

Charset 属性将字符集名称(如 ISO-LATIN-7)附加到 Response 对象中 content-type 标题的后面。

语法

Response.Charset(CharsetName) 

参数

CharsetName
指定该网页的字符集的字符串。字符集的名称将被附加到 Response 对象中的 content-type 标题的后面。

示例

对于不包含 Response.Charset 属性的 ASP 页,content-type 标题将为:

content-type:text/html

如果同样的 .asp 文件包含

<% Response.Charset("ISO-LATIN-7") %>

则 content-type 标题将为:

content-type:text/html; charset=ISO-LATIN-7 

注释

无论字符串表示的字符集是否有效,该功能都会将其插入 content-type 标题中。

如果某个页包含多个含有 Response.Charset 的标记,则每个 Response.Charset 都将替代前一个 CharsetName。这样,字符集将被设置为该页中 Response.Charset 的最后一个实例所指定值。

在 Macintosh 系统上,默认的 U.S. 字符集设置不是 ISO-LATIN-1。当处理文档时,用于 Macintosh 系统的个人 Web 服务器自动从 Macintosh 字符集转换为 ISO-Latin-1。在 U.S. 版本中,如果未使用 Response.Charset 转换字符集,而且用于 Macintosh 系统的个人 Web 服务器不转换字符集,那么所有网页都被假定为在 U.S. Macintosh 字符集中。

应用于

Response 对象