提及带有 ASP 203 错误的代码页时,VBscript 崩溃

VBscript craches when mentioning the CodePage with an ASP 203 error

我有一个 ASP 页面以这样的 VBscript 开头:

<%@ Language=VBScript CodePage=iso-8859-1%>
<% ...

此代码在 W2K 下的 IIS6 上运行良好,但在使用 IIS7.5 迁移到 windows 2008 时,出现此错误:

Active Server Pages error 'ASP 0203'

Invalid Code Page

/path/to/my_page.asp, line 1

The specified code page attribute is invalid.

删除代码页时,一切正常。谁能解释一下为什么?

Codepage参数只支持数字,例如:

<%@Codepage = 65001 %>

您可以看到 table 个有效值 here。将此编号用于 ISO-8859-1:

<%@Codepage = 28591 %>