0
我有一个代码文件,我将其称为“myConstants.res.asp”与一群在英语和法语常数...为什么包含保存为UTF8 + BOM的unicode字符串常量的代码文件显示正确,但保存为UTF8时,它们不在经典ASP中?
<%
const myStr1 = "Bienvenue dans ma maison au moment de cette belle journée de repos et de détente"
const myStr2 = "Welcome to my house at this beautiful day of rest and relaxation"
... more constants ...
%>
此常数文件包含在其它ASP代码文件具有以下结构...
<%@ Language="VBSCRIPT" EnableSessionState=False %>
<%
Option Explicit
Response.CharSet = "UTF-8"
Response.CodePage = 65001
%>
<!-- #include file = "myConstants.res.asp" -->
... additional code ...
如果我保存为UTF8 + BOM的Unicode字符正确显示这在我的例子中的情况是只为恒myStr1
的问题myConstants.res.asp
文件。实际上我有几百个这样的字符串。如果我将myConstants.res.asp
文件保存为UTF8(无BOM)。 Unicode字符显示为垃圾。
有关为什么会发生这种情况的任何想法?