CharsetCharset 屬性將字符集名稱(如 ISO-LATIN-7)附加到 Response 對象中 content-type 標題的后面。 語法Response.Charset(CharsetName) 參數
示例對于不包含 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 對象 |
溫馨提示:喜歡本站的話,請收藏一下本站!